bugixing (inifile for snapcontrol must not be deleted with copytools script)

This commit is contained in:
Michael H.G. Schmidt 2023-03-12 10:37:26 +01:00
parent 19b0b47045
commit 0917244f17

View File

@ -5,17 +5,17 @@ if %ERRORLEVEL% neq 0 exit /b
set TOOLS=%SystemDrive%\tools
set INI_STANDARD=..\scripts\config\snapcontrol.ini
set INI_COMPANY=..\company\snapcontrol.ini
set INI_TARGET=%TOOLS%\snapcontrol.ini
echo ####### %0 #######
if EXIST %INI_COMPANY% (
if NOT EXIST %INI_TARGET% (
if NOT EXIST %windir%\snapcontrol.ini (
echo putting COMPANY inifile in place ...
copy /Y %INI_COMPANY% %INI_TARGET%
%TOOLS%\searchreplace %INI_TARGET% "__COMPUTERNAME__" "%COMPUTERNAME%"
%TOOLS%\snapcontrol /I
copy /Y %INI_COMPANY% %windir%
move /Y %TOOLS%\snapcontrol.exe %windir% 2>nul
%TOOLS%\searchreplace %windir%\snapcontrol.ini "__COMPUTERNAME__" "%COMPUTERNAME%"
%windir%\snapcontrol /I
) else (
echo inifile already copied. nothing to do!
)
@ -24,10 +24,11 @@ if EXIST %INI_COMPANY% (
if EXIST %INI_STANDARD% (
if NOT EXIST %INI_TARGET% (
if NOT EXIST %windir%\snapcontrol.ini (
echo putting STANDARD inifile in place ...
copy /Y %INI_STANDARD% %INI_TARGET%
%TOOLS%\snapcontrol /I
copy /Y %INI_STANDARD% %windir%
move /Y %TOOLS%\snapcontrol.exe %windir% 2>nul
%windir%\snapcontrol /I
) else (
echo inifile already copied. nothing to do!
)