2022-11-13 22:12:39 +01:00
|
|
|
@echo off
|
|
|
|
call check-for-admin
|
2022-11-25 15:29:57 +01:00
|
|
|
if %ERRORLEVEL% neq 0 exit /b
|
2022-11-13 22:12:39 +01:00
|
|
|
|
2023-03-11 23:38:45 +01:00
|
|
|
set TOOLS=%SystemDrive%\tools
|
|
|
|
set INI_STANDARD=..\scripts\config\snapcontrol.ini
|
|
|
|
set INI_COMPANY=..\company\snapcontrol.ini
|
2022-11-13 22:12:39 +01:00
|
|
|
|
|
|
|
echo ####### %0 #######
|
|
|
|
|
2023-03-12 11:28:34 +01:00
|
|
|
echo moving snapcontrol binary to [ %windir% ] ...
|
|
|
|
move /Y %TOOLS%\snapcontrol.exe %windir% 2>nul
|
|
|
|
|
2023-03-11 23:38:45 +01:00
|
|
|
if EXIST %INI_COMPANY% (
|
|
|
|
|
2023-03-12 10:37:26 +01:00
|
|
|
if NOT EXIST %windir%\snapcontrol.ini (
|
2023-03-11 23:38:45 +01:00
|
|
|
echo putting COMPANY inifile in place ...
|
2023-03-12 10:37:26 +01:00
|
|
|
copy /Y %INI_COMPANY% %windir%
|
|
|
|
%TOOLS%\searchreplace %windir%\snapcontrol.ini "__COMPUTERNAME__" "%COMPUTERNAME%"
|
|
|
|
%windir%\snapcontrol /I
|
2023-03-11 23:38:45 +01:00
|
|
|
) else (
|
|
|
|
echo inifile already copied. nothing to do!
|
|
|
|
)
|
|
|
|
|
|
|
|
) else (
|
|
|
|
|
|
|
|
if EXIST %INI_STANDARD% (
|
|
|
|
|
2023-03-12 10:37:26 +01:00
|
|
|
if NOT EXIST %windir%\snapcontrol.ini (
|
2023-03-11 23:38:45 +01:00
|
|
|
echo putting STANDARD inifile in place ...
|
2023-03-12 10:37:26 +01:00
|
|
|
copy /Y %INI_STANDARD% %windir%
|
|
|
|
%windir%\snapcontrol /I
|
2023-03-11 23:38:45 +01:00
|
|
|
) else (
|
|
|
|
echo inifile already copied. nothing to do!
|
|
|
|
)
|
|
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
)
|
2022-11-13 22:12:39 +01:00
|
|
|
|
|
|
|
echo ####### %0 #######
|
|
|
|
pause
|
|
|
|
|