w10install/optional/install-snapcontrol.cmd
Michael H.G. Schmidt 20aed4de9a bugfix
2023-03-12 11:28:34 +01:00

44 lines
948 B
Batchfile

@echo off
call check-for-admin
if %ERRORLEVEL% neq 0 exit /b
set TOOLS=%SystemDrive%\tools
set INI_STANDARD=..\scripts\config\snapcontrol.ini
set INI_COMPANY=..\company\snapcontrol.ini
echo ####### %0 #######
echo moving snapcontrol binary to [ %windir% ] ...
move /Y %TOOLS%\snapcontrol.exe %windir% 2>nul
if EXIST %INI_COMPANY% (
if NOT EXIST %windir%\snapcontrol.ini (
echo putting COMPANY inifile in place ...
copy /Y %INI_COMPANY% %windir%
%TOOLS%\searchreplace %windir%\snapcontrol.ini "__COMPUTERNAME__" "%COMPUTERNAME%"
%windir%\snapcontrol /I
) else (
echo inifile already copied. nothing to do!
)
) else (
if EXIST %INI_STANDARD% (
if NOT EXIST %windir%\snapcontrol.ini (
echo putting STANDARD inifile in place ...
copy /Y %INI_STANDARD% %windir%
%windir%\snapcontrol /I
) else (
echo inifile already copied. nothing to do!
)
)
)
echo ####### %0 #######
pause