diff --git a/optional/install-snapcontrol.cmd b/optional/install-snapcontrol.cmd index d9d903d..4050f1e 100644 --- a/optional/install-snapcontrol.cmd +++ b/optional/install-snapcontrol.cmd @@ -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! )