i integrated a bat file to compress windows install footprint. its worked when running in vmware but when i install it on a real machine it didnt work
icy007 wrote:hi [You must be registered and logged in to see this link.]
Winreducer does not pass the commands from a bath file to dism.exe inside Winreducer,
this is never going to work.
But You can clean é compress WinSxS
icy
Code:
@ECHO OFF
for %%i in (C D E F G H I J K L M N O P Q R S T U V W X Y Z) do if exist %%i:\sources\install.wim set CDROM=%%i:
if not defined CDROM goto :eof
echo Detected CDROM as drive %CDROM%
cd\
Title WINREDUCER POST INSTALLATION
Color F0
@echo ********** Welcome **********"
REGEDIT.EXE /S "%CDROM%\WinReducerEX100PI\RunOnce.reg"
shutdown -r -f -t 0
del %0
Code:
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce]
"1"="C:\\netFramework.cmd"
"2"="C:\\LaufwerkeVerbinden.cmd"
KrX wrote:hi,
what you can do is goto the system tab and i think it was "winreducer post install" were you can see lines like this:Code:
@ECHO OFF
for %%i in (C D E F G H I J K L M N O P Q R S T U V W X Y Z) do if exist %%i:\sources\install.wim set CDROM=%%i:
if not defined CDROM goto :eof
echo Detected CDROM as drive %CDROM%
cd\
Title WINREDUCER POST INSTALLATION
Color F0
@echo ********** Welcome **********"
REGEDIT.EXE /S "%CDROM%\WinReducerEX100PI\RunOnce.reg"
shutdown -r -f -t 0
del %0
i have added the line REGEDIT.EXE /S "%CDROM%\WinReducerEX100PI\RunOnce.reg"
than goto the root folder of your extracted iso and create the WinReducerEX100PI folder and within it a reg file called RunOnce.reg
the reg file can look like this:Code:
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce]
"1"="C:\\netFramework.cmd"
"2"="C:\\LaufwerkeVerbinden.cmd"
there you can add your cmd/batch files.
it will be executed ONCE when your user is loged in the first time
EDIT: ah also in the reg file you can chose a different drive (like an usb drive) but if you set it like me to the C:\ drive you need to add those cmd files in the root of your mounted wim file
vngochson wrote:KrX wrote:hi,
what you can do is goto the system tab and i think it was "winreducer post install" were you can see lines like this:Code:
@ECHO OFF
for %%i in (C D E F G H I J K L M N O P Q R S T U V W X Y Z) do if exist %%i:\sources\install.wim set CDROM=%%i:
if not defined CDROM goto :eof
echo Detected CDROM as drive %CDROM%
cd\
Title WINREDUCER POST INSTALLATION
Color F0
@echo ********** Welcome **********"
REGEDIT.EXE /S "%CDROM%\WinReducerEX100PI\RunOnce.reg"
shutdown -r -f -t 0
del %0
i have added the line REGEDIT.EXE /S "%CDROM%\WinReducerEX100PI\RunOnce.reg"
than goto the root folder of your extracted iso and create the WinReducerEX100PI folder and within it a reg file called RunOnce.reg
the reg file can look like this:Code:
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce]
"1"="C:\\netFramework.cmd"
"2"="C:\\LaufwerkeVerbinden.cmd"
there you can add your cmd/batch files.
it will be executed ONCE when your user is loged in the first time
EDIT: ah also in the reg file you can chose a different drive (like an usb drive) but if you set it like me to the C:\ drive you need to add those cmd files in the root of your mounted wim file
vngochson wrote:vngochson wrote:KrX wrote:hi,
what you can do is goto the system tab and i think it was "winreducer post install" were you can see lines like this:Code:
@ECHO OFF
for %%i in (C D E F G H I J K L M N O P Q R S T U V W X Y Z) do if exist %%i:\sources\install.wim set CDROM=%%i:
if not defined CDROM goto :eof
echo Detected CDROM as drive %CDROM%
cd\
Title WINREDUCER POST INSTALLATION
Color F0
@echo ********** Welcome **********"
REGEDIT.EXE /S "%CDROM%\WinReducerEX100PI\RunOnce.reg"
shutdown -r -f -t 0
del %0
i have added the line REGEDIT.EXE /S "%CDROM%\WinReducerEX100PI\RunOnce.reg"
than goto the root folder of your extracted iso and create the WinReducerEX100PI folder and within it a reg file called RunOnce.reg
the reg file can look like this:Code:
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce]
"1"="C:\\netFramework.cmd"
"2"="C:\\LaufwerkeVerbinden.cmd"
there you can add your cmd/batch files.
it will be executed ONCE when your user is loged in the first time
EDIT: ah also in the reg file you can chose a different drive (like an usb drive) but if you set it like me to the C:\ drive you need to add those cmd files in the root of your mounted wim file
Add cmd files to sources folder right?
Code:
Windows Registry Editor Version 5.00[size=12][/size]
[size=12][/size]
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce][size=12][/size]
"1"="C:\\netFramework.cmd"[size=12][/size]
"2"="C:\\LaufwerkeVerbinden.cmd"
KrX wrote:Hi,
the WinReducerEX100PI,cmd will be moved from winreducer to the right path.
so if you use the reg file like thisCode:
Windows Registry Editor Version 5.00[size=12][/size]
[size=12][/size]
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce][size=12][/size]
"1"="C:\\netFramework.cmd"[size=12][/size]
"2"="C:\\LaufwerkeVerbinden.cmd"
you need to copy those 2 cmd files (when you mounted your iso/wim file with winreducer) to %path to your winreducer folder%\WinReducerEX100_x64\WORK\MOUNT\... next to the "windows", "Program Files (x86)" etc fodler which will be after installation your C:\ drive
for the RunOnce.reg. you need to goto %path to your winreducer folder%\WinReducerEX100_x64\EXTRACT\ExtractedByWinReducer and create the WinReducerEX100PI folder where you will copy the re file to
KrX wrote:sorry i dont understand, do you mean if you need to have the same filename for the cmd file? no you dont, just set the right name in the reg file