Windows – Removing packages from Windows 7 x64 using win6x_registry_tweak

deploymentwindows 7

I was suggested to use this software to remove certain packages from a Windows 7 x64 (as I had some problems with DISM: DISM Error: 0x800f0805).
The program seems to work properly, it claims to have removed the packages, but actually the packages are still present in the image.

EDIT.

Ok, I did some tests in a VM (Win7x64Sp1 installed) removing packages from install.wim /index:2 (Windows 7 HomePremium).

Here are the conclusions:

-the program works with NetFx v3

-there's a version specifically done for NetFx 4.6.1, but it doesn't work with NetFx 4.6.2

-there are three packages that cannot be removed or win6x_registry_tweak goes into an error loop (something like error 50 in DISM).
These packages are:

Windows Foundation Package

Windows ProfessionalEdition wrapper

Windows UltimateEdition wrapper

-the removal of some other packages it breaks Windows setup. They are:

Windows Client Language Pack

Windows Client Drivers

Windows Common Drivers

I hope this can help you. 🙂

Best Answer

This is how servicing stack works. Sometime it needs a running (/Online) windows to remove/install packages. Or you missed to commit the changes you made to the install.wim while unmounting the WIM with DISM.

I always use Setupcomplete.cmd under DVDRoot\sources\$OEM$\$$\Setup\Scripts\ to remove components:

@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:

REG ADD HKLM\Software\Microsoft\Windows\CurrentVersion\RunOnceEx

SET KEY=HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx
SET D=%CDROM%\updates
SET Registry=%CDROM%\Registry

REG ADD %KEY% /V TITLE /D "Remove Windows Packages" /f

REG ADD %KEY%\008 /VE /D "remove Windows Packages" /f
REG ADD %KEY%\008 /V 1 /D "%Windir%\Setup\Scripts\install_wim_tweak.exe /o /c Microsoft-Windows-OpticalMediaDisc-Package /r" /f
REG ADD %KEY%\008 /V 2 /D "%Windir%\Setup\Scripts\install_wim_tweak.exe /o /c Microsoft-Windows-Tuner-Drivers-Package /r" /f
REG ADD %KEY%\008 /V 3 /D "%Windir%\Setup\Scripts\install_wim_tweak.exe /o /c Microsoft-Windows-SUA-Package /r" /f
REG ADD %KEY%\008 /V 4 /D "%Windir%\Setup\Scripts\install_wim_tweak.exe /o /c Microsoft-Windows-SNMP-Package /r" /f 
REG ADD %KEY%\008 /V 5 /D "%Windir%\Setup\Scripts\install_wim_tweak.exe /o /c Microsoft-Hyper-V /r" /f 

REG ADD %KEY%\908 /VE /D "Reboot PC..." /f
REG ADD %KEY%\908 /V 2 /D "shutdown -r -t 0" /f

EXIT