w10install/image/StartAutoconfig.cmd

48 lines
1.1 KiB
Batchfile
Raw Permalink Normal View History

2021-01-10 16:50:35 +01:00
@echo off
2021-01-12 17:01:34 +01:00
rem this script puts everything in place ...
2021-01-10 16:50:35 +01:00
2023-02-20 07:56:50 +01:00
set TOOLS=%SystemDrive%\tools
2023-01-14 17:15:31 +01:00
set SXS=%WINDIR%\sources\sxs
2023-02-20 07:56:50 +01:00
set BATCH=%TOOLS%\scripts\autoconfig.cmd
set LOG=%SystemDrive%\StartAutoconfig.txt
2021-02-03 06:49:13 +01:00
del /F %LOG% 1>nul 2>nul
if not "%1"=="STDOUT_TO_FILE" %0 STDOUT_TO_FILE %* 1>%LOG% 2>&1
shift /1
echo ####### %0 #######
date /t
time /t
echo.
2021-01-10 16:50:35 +01:00
2022-12-29 10:49:17 +01:00
rem WARNING: DO NOT KILL windows explorer here!
rem Explanation: Doing this will result in a crippled
rem windows defender configuration! (the app to open it will not be present)
2021-01-10 16:50:35 +01:00
2021-02-27 21:16:12 +01:00
echo copying folder %TOOLS% ...
robocopy tools %TOOLS% /MIR /256 /NJH /NFL /NDL
echo.
2022-11-25 22:19:53 +01:00
echo copying folder %SXS% ...
robocopy sources\sxs %SXS% /MIR /256 /NJH /NFL /NDL
echo.
2023-02-20 09:29:45 +01:00
echo setting permissions for [%TOOLS% ] ...
cd /D %SystemDrive%\
takeown /F %TOOLS% /R /A /D Y 1>nul
icacls %TOOLS% /inheritance:r
icacls %TOOLS% /grant Administrators:F /t /c /l 1>nul
icacls %TOOLS% /grant Users:RX /t /c /l 1>nul
echo.
2021-01-12 20:23:36 +01:00
echo starting %BATCH% ...
2021-01-14 00:03:49 +01:00
call %BATCH%
2021-01-10 16:50:35 +01:00
echo.
2021-01-12 20:23:36 +01:00
2021-02-03 06:49:13 +01:00
date /t
time /t
2021-01-12 20:23:36 +01:00
echo ####### %0 #######
echo READY.
2021-01-14 00:03:49 +01:00
echo.
2022-12-28 18:52:04 +01:00