2021-01-19 22:59:40 +01:00
|
|
|
@echo off
|
2021-03-16 23:23:06 +01:00
|
|
|
set IMAGE=c:\TEMP\IMAGE
|
2021-03-04 10:52:52 +01:00
|
|
|
|
|
|
|
rem the CHECKFILE is a file that will be monitored against deletion ...
|
2021-03-16 23:23:06 +01:00
|
|
|
set CHECKFILE=%IMAGE%\Windows\SysWOW64\mf.dll
|
2021-01-19 22:59:40 +01:00
|
|
|
|
|
|
|
echo exporting PACKAGE list BEFORE doing any changes ...
|
2021-03-16 23:23:06 +01:00
|
|
|
install_wim_tweak /p %IMAGE% /l
|
2021-01-19 22:59:40 +01:00
|
|
|
move /Y Packages.txt Packages-BEFORE.txt
|
|
|
|
|
2021-01-20 13:00:14 +01:00
|
|
|
rem ###################################
|
|
|
|
rem MAIN loop ( remove packages ) ...
|
|
|
|
rem ###################################
|
|
|
|
|
2021-03-16 23:55:01 +01:00
|
|
|
FOR /F %%P in (packages-to-remove.csv) do (
|
2021-01-19 22:59:40 +01:00
|
|
|
|
2021-03-16 23:23:06 +01:00
|
|
|
echo removing PACKAGE [ %%P ] ...
|
|
|
|
install_wim_tweak.exe /p %IMAGE% /c "%%P" /r /n
|
2021-01-19 22:59:40 +01:00
|
|
|
|
2021-03-04 10:52:52 +01:00
|
|
|
rem we will exit here in case the checkfile was deleted by a package removal ...
|
2021-01-19 22:59:40 +01:00
|
|
|
if NOT EXIST %CHECKFILE% (
|
|
|
|
echo ERROR: File %CHECKFILE% was deleted
|
|
|
|
exit /b
|
|
|
|
)
|
|
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
echo CLEANUP ...
|
|
|
|
del /F SOFTWAREBKP 1>nul 2>nul
|
|
|
|
|
|
|
|
echo exporting remaining PACKAGES list ...
|
2021-03-16 23:23:06 +01:00
|
|
|
install_wim_tweak /p %IMAGE% /l
|
2021-01-19 22:59:40 +01:00
|
|
|
move /Y Packages.txt Packages-AFTER.txt
|
|
|
|
|
2021-03-16 23:23:06 +01:00
|
|
|
rem showing package files ...
|
2021-01-19 22:59:40 +01:00
|
|
|
dir Packages*.txt
|
2021-03-04 10:52:52 +01:00
|
|
|
|