w10install/optional/install-snapcontrol.cmd
Michael H.G. Schmidt 19b0b47045 added snapcontrol
2023-03-11 23:38:45 +01:00

42 lines
858 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
set INI_TARGET=%TOOLS%\snapcontrol.ini
echo ####### %0 #######
if EXIST %INI_COMPANY% (
if NOT EXIST %INI_TARGET% (
echo putting COMPANY inifile in place ...
copy /Y %INI_COMPANY% %INI_TARGET%
%TOOLS%\searchreplace %INI_TARGET% "__COMPUTERNAME__" "%COMPUTERNAME%"
%TOOLS%\snapcontrol /I
) else (
echo inifile already copied. nothing to do!
)
) else (
if EXIST %INI_STANDARD% (
if NOT EXIST %INI_TARGET% (
echo putting STANDARD inifile in place ...
copy /Y %INI_STANDARD% %INI_TARGET%
%TOOLS%\snapcontrol /I
) else (
echo inifile already copied. nothing to do!
)
)
)
echo ####### %0 #######
pause