MSFN Forum: Windows 7 x64 vLite "extreme removal" - MSFN Forum

Jump to content



vLite Forum Rules

If you are having issues with Windows after removing components and have come to ask for help, please attach (not paste) your Last Session.ini file to your post to facilitate quicker assistance.
  • 11 Pages +
  • « First
  • 5
  • 6
  • 7
  • 8
  • 9
  • Last »
  • You cannot start a new topic
  • You cannot reply to this topic

Windows 7 x64 vLite "extreme removal" Shrink image & installation by use of vLite & a batch-file Rate Topic: -----

#121 User is offline   Jeronimo 

  • vLite user
  • PipPipPip
  • Group: Members
  • Posts: 395
  • Joined: 26-October 03

Posted 07 September 2009 - 04:23 AM

@gendouhydeist: I will check for winsxs what the ownership is. Maybe we can explain it from there. I would rather know why it does not work before trying some random solution.

This post has been edited by Jeronimo: 07 September 2009 - 04:37 AM



#122 User is offline   Cr4z33 

  • Junior
  • Pip
  • Group: Members
  • Posts: 66
  • Joined: 27-May 05

Posted 07 September 2009 - 05:00 AM

View PostJeronimo, on Sep 3 2009, 12:33 PM, said:

@Cr4z33: sorry, but I can only help you out once I have my own non-English release. I had no issues when integrating Dutch, removing English and that performing the additional actions.

Did you try your non-English release?
Any issues? :unsure:

#123 User is offline   gendouhydeist 

  • Junior
  • Pip
  • Group: Members
  • Posts: 96
  • Joined: 02-January 07

Posted 07 September 2009 - 06:17 AM

@Jeronimo
ive tried to mount it manually, ive found out that the owner of the Mount is the TrustedInstaller not Everyone nor the administrator... dunno why its always been mounted like that its like ive mounted it with no admin priviledges.. tried to mount it with 3 programs dism, imagex, & gimagex

Here's The ScreenShot
http://img200.imageshack.us/slideshow/webp...php?id=dism.jpg
http://img200.images....php?g=dism.jpg

#124 User is offline   ricktendo64 

  • Group: Banned Members
  • PipPipPipPipPipPipPipPip
  • Group: Members
  • Posts: 2,125
  • Joined: 06-June 06
  • OS:Windows 7 x64
  • Country: Country Flag

Posted 07 September 2009 - 04:22 PM

Does anybody know which of these components I removed break Windows Experience/Performance Index? (the system rating 1.0 to 7.9 windows gives your hardware configuration)

I notice my fingerprint software is broken too, if anybody could have a look at what I removed with waik/dism (did not use vlite)

 
Anytime-Upgrade-Results
Backup
BLB-Client
ClipsInTheLibrary
Common-Modem-Drivers
IIS-WebServer-AddOn-2
IIS-WebServer-AddOn
IIS-WebServer
Indexing-Service
LocalPack-AU
LocalPack-CA
LocalPack-GB
LocalPack-US
LocalPack-ZA
NFS-ClientSKU
OpticalMediaDisc
ParentalControls
Printer-Drivers
RasCMAK
RasRip
SampleContent-Music
SampleContent-Ringtones
Shell-HomeGroup
Shell-MultiplayerInboxGames
Shell-PremiumInboxGames
Shell-InboxGames
Shell-SoundThemes
SnippingTool
SNMP
StickyNotes
SUA
SystemRestore
TabletPC-OC
Telnet-Client
Telnet-Server
TFTP-Client
Tuner-Drivers
WinOcr 


BTW I am using Windows 7 Ultimate

This post has been edited by ricktendo64: 07 September 2009 - 04:23 PM


#125 User is offline   iceangel89 

  • Advanced Member
  • PipPipPip
  • Group: Members
  • Posts: 453
  • Joined: 10-February 07
  • OS:Windows 7 x64
  • Country: Country Flag

Posted 07 September 2009 - 11:16 PM

i need some help editing removal.bat

i actually posted it http://www.msfn.org/board/index.php?s=&...st&p=881314 but i think this is a better place to put it since removal.bat comes from here

#126 User is offline   Jeronimo 

  • vLite user
  • PipPipPip
  • Group: Members
  • Posts: 395
  • Joined: 26-October 03

Posted 08 September 2009 - 04:52 AM

@ricktendo64: please discuss this in a sperate topic as it is not directly related to the guid I provided (on the subject: I can only state the obvious components).

@iceangel89: You need WAIK from Vista SP1, see main post not sure if it is WAIK 1.1. Build 7600 is the final build limited to certain Microsoft subscriptions. Everyone else will have to wait or check elsewhere (no discussions on this here). Editing the removal.bat is something you know or you learn (google for guides).

#127 User is offline   SausageHack 

  • I love duct tape
  • Pip
  • Group: Members
  • Posts: 72
  • Joined: 10-July 09
  • OS:Windows 7 x64
  • Country: Country Flag

Posted 08 September 2009 - 08:47 PM

Jeronimo, I updated my guide :)

I ran in to way too many issues with removal_custom, so I decided to drop it for now. I have implemented some new things, but I really hope to squeeze out a signifigant update soon.

I also added a guide for Windows 7 Toolkit... neat little program

Dude seriously I give up how do you make a user-input batch file??? I'm stumped! I wanna set it up to say something like 'Press 1 for Packages' or 'Press 2 for cleanup'

thanks

#128 User is offline   liquidzgurl 

  • Newbie
  • Group: Members
  • Posts: 36
  • Joined: 30-August 09

Posted 09 September 2009 - 12:43 AM

Great job jeronimo its hard work and takes a lot of knowledge careful planning and time to test cause and effect to create successful scripts I couldn't do it myself if I tried right now oh btw this is like the name says I'm liquids b1tch lol but I'm still semi noob anyways again great job and be sure to check out liquids new post and attachments :) let us know what you think I helped him with all the wording see his post @ Liquidspost

This post has been edited by liquidzgurl: 09 September 2009 - 12:54 AM


#129 User is offline   Cr4z33 

  • Junior
  • Pip
  • Group: Members
  • Posts: 66
  • Joined: 27-May 05

  Posted 09 September 2009 - 12:49 AM

View PostCr4z33, on Sep 2 2009, 11:06 AM, said:

I cannot apply the install_wim_tweak in no f*****g way neither in a real x64 partition nor into wmware because of ownership problems. :realmad:
SYSTEM is the owner and I cannot find a way to take the ownership of the SOFTWARE file located into C:\s2\windows\system32\config.
Even if I apply the authorization settings when I run the tweak I get that annoying error showed below again and again.
For the record it says something like "Exception not handled: System.Unauthorizedblah blah blah" and "Access to path: 'c:\s2\windowsblah blahblah' denied".
Please help. :(
Posted Image

Seriously people if someone finds a solution to this please post it here. :(

#130 User is offline   liquidzgurl 

  • Newbie
  • Group: Members
  • Posts: 36
  • Joined: 30-August 09

Posted 09 September 2009 - 01:08 AM

I'm not 100% sure about this but I think you need to highlight your c drive in computer right click then left click properties and go to security tab then advanced settings then owner tab take ownership check the box that says replace ownership on all subcontainers or something like that then hit ok exit and go back in again the same way so it applies the change go back into security tab click edit and give yourself full control and apply then go back to advanced permissions and highlight yourself where it says full control next to your name and at the bottom the 2nd checkbox says replace all inherited permissions on ... Hit apply and okay and that should fix the problem and turn off user user account control for future purposes I hope that helps


#131 User is offline   Jeronimo 

  • vLite user
  • PipPipPip
  • Group: Members
  • Posts: 395
  • Joined: 26-October 03

Posted 09 September 2009 - 04:42 AM

@SausageHack:
echo 1 do this
echo 2 do that
echo 0 do nothing
choice /C 120 /N /M "Make your choice"
if errorlevel 3 goto exit
if errorlevel 2 goto dothat
if errorlevel 1 goto dothis


See help on choice and errorlevel for proper usage.

This post has been edited by Jeronimo: 09 September 2009 - 04:42 AM


#132 User is offline   Cr4z33 

  • Junior
  • Pip
  • Group: Members
  • Posts: 66
  • Joined: 27-May 05

Posted 10 September 2009 - 12:49 AM

View Postliquidzgurl, on Sep 9 2009, 09:08 AM, said:

I'm not 100% sure about this but I think you need to highlight your c drive in computer right click then left click properties and go to security tab then advanced settings then owner tab take ownership check the box that says replace ownership on all subcontainers or something like that then hit ok exit and go back in again the same way so it applies the change go back into security tab click edit and give yourself full control and apply then go back to advanced permissions and highlight yourself where it says full control next to your name and at the bottom the 2nd checkbox says replace all inherited permissions on ... Hit apply and okay and that should fix the problem and turn off user user account control for future purposes I hope that helps

I did that already, but it looks like the user SYSTEM is still the owner I don't know why. :no:
Thanks anyway for your help.

#133 User is offline   liquidzgurl 

  • Newbie
  • Group: Members
  • Posts: 36
  • Joined: 30-August 09

Posted 10 September 2009 - 01:20 AM

sorry well if noone else replies maybe check google for resources that have screen shots with full step by step instructions and if that doesn't work either and you run out of options I'd say back up your data format and try to set ownership and permissions again in case something got messed up causing the problem good luck !


#134 User is offline   gendouhydeist 

  • Junior
  • Pip
  • Group: Members
  • Posts: 96
  • Joined: 02-January 07

Posted 10 September 2009 - 11:21 AM

@Jeronimo
What imagex your using right now? is it came from WAIK for Win7 or Vista SP1, im currently using Win7 imagex right now and same goes to Wim Filter for vLite are using vista sp1 also?

#135 User is offline   Jeronimo 

  • vLite user
  • PipPipPip
  • Group: Members
  • Posts: 395
  • Joined: 26-October 03

Posted 10 September 2009 - 11:44 AM

@gendouhydeist: I do not understand the complete question , but as my opening post states, Vista SP1 WAIK should be used (and that is what I am using).

#136 User is offline   gendouhydeist 

  • Junior
  • Pip
  • Group: Members
  • Posts: 96
  • Joined: 02-January 07

Posted 12 September 2009 - 07:37 PM

i mean vlite is also using Windows Image File Mini-Filter Driver (wimfltr.sys) in vLite\wimfltr\x86 are you also using the latest one?

#137 User is offline   Cr4z33 

  • Junior
  • Pip
  • Group: Members
  • Posts: 66
  • Joined: 27-May 05

  Posted 14 September 2009 - 09:05 AM

I solved the permissione problem!
I found out that you have to type
imagex /mountrw

and not
imagex /mount

If don't you do that you won't have writing permission! :thumbup

#138 User is offline   Jeronimo 

  • vLite user
  • PipPipPip
  • Group: Members
  • Posts: 395
  • Joined: 26-October 03

Posted 14 September 2009 - 10:42 AM

@gendouhydeist: I used the one delivered with vLite and I would use the one from Windows Vista AIK SP1 if I would need it now.
@Cr4z33: I do not even need to check, I now I always use mountrw in my batch-file and never mount.

#139 User is offline   Cr4z33 

  • Junior
  • Pip
  • Group: Members
  • Posts: 66
  • Joined: 27-May 05

Posted 14 September 2009 - 11:12 AM

View PostJeronimo, on Sep 14 2009, 06:42 PM, said:

@gendouhydeist: I used the one delivered with vLite and I would use the one from Windows Vista AIK SP1 if I would need it now.
@Cr4z33: I do not even need to check, I now I always use mountrw in my batch-file and never mount.

Yeah, my fault actually.
I just realised I had to run no commands at all apart from removal.bat and its related actions... :blushing:

#140 User is offline   Cr4z33 

  • Junior
  • Pip
  • Group: Members
  • Posts: 66
  • Joined: 27-May 05

  Posted 16 September 2009 - 11:56 AM

OK I am getting a different problem now.
I succesfully created a first Windows 7 Ultimate ITA installation, but I didn't like the fact .NET Framework was missing and many programs needed it.
So I started again making a new revision, but now during the Windows installation I get a generic installation error when the setup is at the Updates step. :no:
I have to say I got some errors while running removal.bat, also I didn't need to include languages (I've got an Italian RTM build), drivers and updates.
All I want is to remove the unneeded stuff but Windows Media Player, .NET Framework and the Intel Matrix Storage drivers.
Therefore I deselected Windows Media Player and the INTEL driver in vLite, and used "set remove.NET=K" in REMOVAL.BAT.
Here is how does my batch file look like:
@echo off

REM Initialisation part 2 triggered from removal_custom.bat
if "%1" == "init2" goto init2

REM Initialising environment variables (check for your usage)
REM ----------------------------------------------------------------------------
REM Windows codebase: amd64, x86 or empty (determine from %DVD%\setup.exe)
set cb=amd64
REM Windows 7 build
set build=7600
REM Sub version
set svn=16385
REM Pre-part (the same for all Windows 7 builds?)
set pre=31bf3856ad364e35
REM Image edition (Starter, HomeBasic, HomePremium, Professional or Ultimate)
set edition=Ultimate
REM Obsolete - Image Index (pre-vLite: 1 HomeBasic/Starter, 2 Home Premium, 3 Professional, 4 Ultimate)
set II=4
REM Remove Microsoft.NET (C for complete removal, V to keep vLite working or K to keep)
set remove.NET=K

REM Folder of updates to be integrated
set updateloc=C:\vLite\Updates
REM Extenstion of the updates to be integrated (msu, cab or * for all/both)
set update.ext=*

REM Folder of drivers to be integrated
set driverloc=C:\vLite\Drivers

REM Language to be integrated (do not change to your en-US/0409)
set lang=it-IT
set langid=1040
REM Program location intlcfg.exe (WAIK)
set intlcfg=C:\vLite\intlcfg.exe
REM Location Language pack and extracted files for Localised Setup
set langloc=C:\vLite\Langpack

REM DVD & sources-folder containing install.wim (and dism.exe)
set DVD=D:\s1

REM Folder for mount (Dism/Imagex) or Root (Imagex)
set mount=D:\s2

REM Imagex
set imagex="C:\vLite\imagex.exe"
Rem Dism
set dism="%sources%\dism.exe"

REM Command for install WIM tweak
REM -----------------------------
set iwt=install_wim_tweak.exe /p %mount% /m

REM Command for creating an image from an active installation at OOBE (EXAMPLE!)
REM ----------------------------------------------------------------------------
REM %imagex% /compress maximum /flags "HomePremium" /capture e: c:\install.wim "Windows 7 Home Premium" "Windows 7 Home Premium"


REM Initialising other environment variables
REM ----------------------------------------------------------------------------
:init2
set PATH=%PATH%;%cd%
set version=6.1.%build%.%svn%
set tail=~%pre%~%cb%~~%version%
set IEver=8.0.%build%.%svn%
set tailIE=~%pre%~%cb%~~%IEver%
if not exist %mount% mkdir %mount%
set sources=%DVD%\sources

REM Set Image id for your edition
for /l %%i in (1,1,6) do (
 %imagex% /info "%sources%\install.wim" %%i|find /i "flags"|find /i "%edition%" >nul
 if not errorlevel 1 set II=%%i
)

REM Set the proper codebase
if %cb% == "" (
 find /i "processorArchitecture=""amd64""" "%DVD%\setup.exe" >nul
 if not errorlevel 1 (set cb=amd64) else (set cb=x86)
)

REM Imagex mount/unmount
set mountimagex=%imagex% /mountrw "%sources%\install.wim" %II% "%mount%"
set unmountimagex=%imagex% /unmount /commit %mount%
set discardimagex=%imagex% /unmount %mount%

REM Dism mount/unmount
set mountdism=%dism% /mount-wim /wimfile:"%sources%\install.wim" /index:%II% /mountdir:%mount%
set unmountdism="%sources%\dism.exe" /unmount-wim /mountdir:%mount% /commit
set discarddism="%sources%\dism.exe" /unmount-wim /mountdir:%mount% /discard
set getpackages="%sources%\dism.exe" /image:%mount% /get-packages
set rempackage="%sources%\dism.exe" /image:%mount% /remove-package /packagename:

REM Command for mounting by Imagex or Dism (currently Imagex)
REM ---------------------------------------------------------
set mountimage=if not exist "%mount%\Windows" %mountimagex%
set unmountimage=if exist "%mount%\Windows" %unmountimagex%
set discardimage=if exist "%mount%\Windows" %discardimagex%
REM set mountimage=if not exist "%mount%\Windows" %mountdism%
REM set unmountimage=if exist "%mount%\Windows" %unmountdism%
REM set discardimage=if exist "%mount%\Windows" %discarddism%


REM Initialisation part 2 triggered from removal_custom.bat
if "%1" == "init2" goto end
REM Languagepack integration Windows (pre-vLite)
if "%1"=="langpack" goto langpack
REM Languagepack integration Setup (pre-vLite)
if "%1"=="langpack2" goto langpack2
REM Update integration (pre-vLite)
if "%1"=="updates" goto updates
REM Packages removal (pre-vLite)
if "%1"=="packages" goto packages
REM Update integration + packages removal (pre-vLite)
if "%1"=="pre" goto updates
REM Cleanup of "redundant files and folders (post-vLite)
if "%1"=="cleanup" goto cleanup
REM Integrate drivers (post-vLite)
if "%1"=="drivers" goto drivers
REM Not recommended: packages+cleanup+drivers (pre-vLite)
if "%1"=="full" goto packages
REM Clean-up + integrate drivers (post-vLite prefereable)
if "%1"=="post" goto cleanup
REM Actions under the freshly installed Windows (post-installation)
if "%1"=="final" goto final


REM Initialisation of environment variables for manual use
set updates=%0 updates
set langpack=%0 langpack
set langpack2=%0 langpack2
set packages=%0 packages
set cleanup=%0 cleanup
set drivers=%0 drivers
set pre=%0 pre
set post=%0 post
set full=%0 full
set final=%0 final

REM Custom action in removal_custom.bat
if exist removal_custom.bat (
 if not "%1" == "" set %1=removal_custom.bat %1
 removal_custom.bat %1
 if not "%1" == "" goto unmount
)

start "WIM-prompt" cmd
exit

REM Update integration (pre-vLite)
REM ----------------------------------------------------------------------------
:updates
%mountimage%
for /f %%i in ("%updateloc%\*.%update.ext%") do %dism% /image:"%mount%" /add-package /packagepath:"%%i"
if "%1" == "updates" goto unmount 


REM Packages removal (pre-vLite)
REM ----------------------------------------------------------------------------
:packages
%mountimage%
REM Perform the install Wim tweak
%iwt%

REM Remove "localisation" packages
%getpackages%|find "Microsoft-Windows-Client-LanguagePack-Package~%pre%~%cb%~%lang%~%version%" >nul
if not errorlevel 1 if not "%lang%" == "en-US"  %rempackage%Microsoft-Windows-Client-LanguagePack-Package~%pre%~%cb%~en-US~%version%
%rempackage%Microsoft-Windows-LocalPack-AU-Package%tail%
%rempackage%Microsoft-Windows-LocalPack-CA-Package%tail%
%rempackage%Microsoft-Windows-LocalPack-GB-Package%tail%
%rempackage%Microsoft-Windows-LocalPack-US-Package%tail%
%rempackage%Microsoft-Windows-LocalPack-ZA-Package%tail%

REM Remove "Windows Features" pacakages
%rempackage%Microsoft-Windows-Gadget-Platform-Package%tail%
%rempackage%Microsoft-Windows-IE-Troubleshooters-Package%tail%
%rempackage%Microsoft-Windows-InternetExplorer-Optional-Package%tailIE%
%rempackage%Microsoft-Windows-OpticalMediaDisc-Package%tail%
%rempackage%Microsoft-Windows-Shell-MultiplayerInboxGames-Package%tail%
%rempackage%Microsoft-Windows-SnippingTool-Package%tail%
%rempackage%Microsoft-Windows-StickyNotes-Package%tail%
%rempackage%Microsoft-Windows-Xps-Foundation-Client-Package%tail%

REM Remove packages (1/3)
%rempackage%Microsoft-Hyper-V-Common-Drivers-Package%tail%
%rempackage%Microsoft-Hyper-V-Guest-Integration-Drivers-Package%tail%
%rempackage%Microsoft-Windows-Anytime-Upgrade-Results-Package%tail%
%rempackage%Microsoft-Windows-Backup-Package%tail%
%rempackage%Microsoft-Windows-BLB-Client-Package%tail%
%rempackage%Microsoft-Windows-BusinessScanning-Feature-Package%tail%
%rempackage%Microsoft-Windows-ClipsInTheLibrary-Package%tail%
%rempackage%Microsoft-Windows-GPUPipeline-Package%tail%
%rempackage%Microsoft-Windows-GroupPolicy-ClientExtensions-Package%tail%
%rempackage%Microsoft-Windows-Links-Package%tail%
%rempackage%Microsoft-Windows-MobilePC-Client-Sensors-Package%tail%
%rempackage%Microsoft-Windows-PeerDist-Client-Package%tail%
%rempackage%Microsoft-Windows-PhotoPremiumPackage%tail%
%rempackage%Microsoft-Windows-RecDisc-SDP-Package%tail%
%rempackage%Microsoft-Windows-Shell-HomeGroup-Package%tail%
%rempackage%Microsoft-Windows-TerminalServices-Publishing-WMIProvider-Package%tail%
%rempackage%Microsoft-Windows-TerminalServices-RemoteApplications-Client-Package%tail%
%rempackage%Microsoft-Windows-VirtualPC-Licensing-Package%tail%
%rempackage%Microsoft-Windows-VirtualPC-USB-RPM-Package%tail%
%rempackage%Microsoft-Windows-VirtualXP-Licensing-Package%tail%
%rempackage%Microsoft-Windows-WindowsMediaPlayer-Troubleshooters-Package%tail%
%rempackage%Microsoft-Windows-WinOcr-Package%tail%
if "%edition%"=="Professional" %rempackage%Networking-MPSSVC-Rules-HomePremiumEdition-Package%tail%
if "%edition%"=="HomePremium" %rempackage%Networking-MPSSVC-Rules-BusinessEdition-Package%tail%
if not "%edition%"=="Ultimate" %rempackage%Networking-MPSSVC-Rules-UltimateEdition-Package%tail%

REM Remove packages (2/3)
%rempackage%Microsoft-Media-Foundation-Package%tail%
%rempackage%Microsoft-Windows-Client-Wired-Network-Drivers-Package%tail%
%rempackage%Microsoft-Windows-CodecPack-Basic-Encoder-Package%tail%
%rempackage%Microsoft-Windows-Editions-Client-Package%tail%
%rempackage%Microsoft-Windows-GroupPolicy-ClientTools-Package%tail%
%rempackage%Microsoft-Windows-NetworkDiagnostics-DirectAccessEntry-Package%tail%
%rempackage%Microsoft-Windows-ServicingBaseline-Ultimate-Package%tail%

REM Remove packages (3/3)
if not "%edition%"=="Ultimate" %rempackage%Microsoft-Windows-Anytime-Upgrade-Package%tail%
if "%edition%"=="Professional" %rempackage%Microsoft-Windows-Branding-HomePremium-Client-Package%tail%
if "%edition%"=="HomePremium" %rempackage%Microsoft-Windows-Branding-Professional-Client-Package%tail%
if not "%edition%"=="Ultimate" %rempackage%Microsoft-Windows-Branding-Ultimate-Client-Package%tail%
if not "%remove.NET%" == "K" %rempackage%Microsoft-Windows-NetFx3-OC-Package%tail%
%rempackage%Microsoft-Windows-OfflineFiles-Package%tail%
if "%edition%"=="Professional" %rempackage%Microsoft-Windows-Security-SPP-Component-SKU-HomePremium-Package%tail%
if "%edition%"=="HomePremium" %rempackage%Microsoft-Windows-Security-SPP-Component-SKU-Professional-Package%tail%
if not "%edition%"=="Ultimate" %rempackage%Microsoft-Windows-Security-SPP-Component-SKU-Ultimate-Package%tail%
%rempackage%Microsoft-Windows-ShareMedia-ControlPanel-Package%tail%
if not "%edition%"=="Ultimate" %rempackage%Microsoft-Windows-StorageService-Package%tail%
if "%1"=="packages" goto unmount
if "%1"=="pre" goto unmount


REM Cleanup of "redundant" files and folders (post-vLite)
REM ----------------------------------------------------------------------------
:cleanup
%mountimage%

REM Remove packages
%rempackage%Microsoft-Windows-ICM-Package%tail%
%dism% /image:%mount% /disable-feature:MediaPlayback
echo Disregard the above message, feature was properly disabled!

REM Fix Registry key (NameSpace)
reg load HKLM\%edition%_%part% %mount%\Windows\System32\config\software
reg delete HKLM\%edition%_%part%\Microsoft\Windows\CurrentVersion\Explorer\Desktop\NameSpace\{98D99750-0B8A-4c59-9151-589053683D73} /f
reg unload HKLM\%edition%_%part%

REM Logfiles
del /f /s /q "%mount%\*.log" >nul

REM BITS related files (untested with Windows Update)
REM del /f /q "%mount%\ProgramData\Microsoft\Network\Downloader\qmgr?.dat" >nul

REM Empty folders
rd /s /q "%mount%\Program Files\Windows Portable Devices" >nul
rd /s /q "%mount%\Program Files (x86)\Windows Portable Devices" >nul

REM Internet Explorer
move /y "%mount%\Program Files\Internet Explorer\ieproxy.dll" "%mount%\Windows\system32" >nul
rd /s /q "%mount%\Program Files\Internet Explorer" >nul
rd /s /q "%mount%\Program Files (x86)\Internet Explorer" >nul
rd /s /q "%mount%\Users\Administrator\AppData\Local\Microsoft\Internet Explorer" >nul
del /f /q "%mount%\Users\Administrator\AppData\Roaming\Microsoft\Internet Explorer\Quick Launch\User Pinned\TaskBar\*.lnk" >nul

REM Microsoft Games
rd /s /q "%mount%\Program Files\Microsoft Games" >nul

REM Default pictures
rd /s /q "%mount%\ProgramData\Microsoft\User Account Pictures\Default Pictures" >nul

REM Ringtones
rd /s /q "%mount%\ProgramData\Microsoft\Windows\Ringtones" >nul

REM Public
for /d %%i in ("%mount%\Users\Public\*.*") do rd /s /q "%%i" >nul 2>&1

REM Boot languages
for /d %%i in ("%mount%\Windows\Boot\EFI\*-*") do (
 if not "%%i" == "%mount%\Windows\Boot\EFI\nl-NL" if not "%%i" == "%mount%\Windows\Boot\EFI\en-US" rd /s /q "%%i" >nul
)

REM Help
%getpackages%|find "Microsoft-Windows-Client-LanguagePack-Package~%pre%~%cb%~en-US~%version%" >nul
if not errorlevel 1 (
 del /f /q "%mount%\Windows\Help\mui\0409\*.chm" >nul
 del /f /q "%mount%\Windows\Help\Windows\en-US\*.h1s" >nul
)
%getpackages%|find "Microsoft-Windows-Client-LanguagePack-Package~%pre%~%cb%~%lang%~%version%" >nul
if not errorlevel 1 (
 del /f /q "%mount%\Windows\Help\mui\%langid%\*.chm" >nul
 del /f /q "%mount%\Windows\Help\Windows\%lang%\*.h1s" >nul
)

REM Media
rd /s /q "%mount%\Users\Administrator\AppData\Local\Microsoft\Windows Media" >nul
for /d %%i in ("%mount%\Windows\Media\*") do rd /s /q "%%i" >nul
del /s /f /q "%mount%\Windows\Media\*.mid" >nul

REM Remove Recovery
del /s /f /q "%mount%\Windows\System32\Recovery\*.*" >nul

REM Wallpapers
for /d %%i in (%mount%\Windows\Web\Wallpaper\*) do rd /s /q %%i >nul

REM Windows Powershell
rd /s /q "%mount%\windows\system32\WindowsPowerShell" >nul
rd /s /q "%mount%\windows\syswow64\WindowsPowerShell" >nul

REM Nullify Backup folder (Filenames required for Windows update)
for %%i in ("%mount%\Windows\winsxs\Backup\*") do type nul>"%%i"

REM Redundant drivers
REM ATi
set part=ati
del /f /s /q "%mount%\Windows\inf\%part%*" >nul
del /f /s /q "%mount%\Windows\winsxs\Manifests\%cb%_%part%*" >nul
for /d %%i in (%mount%\Windows\system32\Driverstore\FileRepository\%part%*) do rd /s /q %%i >nul
for /d %%i in (%mount%\Windows\winsxs\%cb%_%part%*) do rd /s /q %%i >nul

REM Brother
set part=brmf
del /f /s /q "%mount%\Windows\inf\%part%*" >nul
del /f /s /q "%mount%\Windows\winsxs\Manifests\%cb%_%part%*" >nul
for /d %%i in (%mount%\Windows\system32\Driverstore\FileRepository\%part%*) do rd /s /q %%i >nul
for /d %%i in (%mount%\Windows\winsxs\%cb%_%part%*) do rd /s /q %%i >nul

REM Fax
set part=faxc
del /f /s /q "%mount%\Windows\inf\%part%*" >nul
del /f /s /q "%mount%\Windows\winsxs\Manifests\%cb%_%part%*" >nul
for /d %%i in (%mount%\Windows\system32\Driverstore\FileRepository\%part%*) do rd /s /q %%i >nul
for /d %%i in (%mount%\Windows\winsxs\%cb%_%part%*) do rd /s /q %%i >nul

REM HP
set part=hp
del /f /s /q "%mount%\Windows\inf\%part%*" >nul
del /f /s /q "%mount%\Windows\winsxs\Manifests\%cb%_%part%*" >nul
for /d %%i in (%mount%\Windows\system32\Driverstore\FileRepository\%part%*) do rd /s /q %%i >nul
for /d %%i in (%mount%\Windows\winsxs\%cb%_%part%*) do rd /s /q %%i >nul

REM Intel Graphics
set part=ig
del /f /s /q "%mount%\Windows\inf\%part%*" >nul
del /f /s /q "%mount%\Windows\winsxs\Manifests\%cb%_%part%*" >nul
for /d %%i in (%mount%\Windows\system32\Driverstore\FileRepository\%part%*) do rd /s /q %%i >nul
for /d %%i in (%mount%\Windows\winsxs\%cb%_%part%*) do rd /s /q %%i >nul

REM Intel Wireless
set part=netw5
del /f /s /q "%mount%\Windows\inf\%part%*" >nul
del /f /s /q "%mount%\Windows\winsxs\Manifests\%cb%_%part%*" >nul
for /d %%i in (%mount%\Windows\system32\Driverstore\FileRepository\%part%*) do rd /s /q %%i >nul
for /d %%i in (%mount%\Windows\winsxs\%cb%_%part%*) do rd /s /q %%i >nul

REM Modem
set part=mdm
del /f /s /q "%mount%\Windows\inf\%part%*" >nul
del /f /s /q "%mount%\Windows\winsxs\Manifests\%cb%_%part%*" >nul
for /d %%i in (%mount%\Windows\system32\Driverstore\FileRepository\%part%*) do rd /s /q %%i >nul
for /d %%i in (%mount%\Windows\winsxs\%cb%_%part%*) do rd /s /q %%i >nul

REM Nvidia
set part=nv
del /f /s /q "%mount%\Windows\inf\%part%*" >nul
del /f /s /q "%mount%\Windows\winsxs\Manifests\%cb%_%part%*" >nul
for /d %%i in (%mount%\Windows\system32\Driverstore\FileRepository\%part%*) do rd /s /q %%i >nul
for /d %%i in (%mount%\Windows\winsxs\%cb%_%part%*) do rd /s /q %%i >nul

REM Printers
set part=prn
del /f /s /q "%mount%\Windows\inf\%part%*" >nul
del /f /s /q "%mount%\Windows\winsxs\Manifests\%cb%_%part%*" >nul
for /d %%i in (%mount%\Windows\system32\Driverstore\FileRepository\%part%*) do rd /s /q %%i >nul
for /d %%i in (%mount%\Windows\winsxs\%cb%_%part%*) do rd /s /q %%i >nul

REM Scanners
set part=wia
del /f /s /q "%mount%\Windows\inf\%part%*" >nul
del /f /s /q "%mount%\Windows\winsxs\Manifests\%cb%_%part%*" >nul
for /d %%i in (%mount%\Windows\system32\Driverstore\FileRepository\%part%*) do rd /s /q %%i >nul
for /d %%i in (%mount%\Windows\winsxs\%cb%_%part%*) do rd /s /q %%i >nul

REM Microsoft.Net
if "%remove.NET%" == "K" goto fonts
for /f %%i in ('dir %mount%\Windows\assembly\1.0* /s /ad /b') do rd /s /q "%%i" >nul
for /f %%i in ('dir %mount%\Windows\assembly\3.0* /s /ad /b') do rd /s /q "%%i" >nul
for /f %%i in ('dir %mount%\Windows\assembly\3.5* /s /ad /b') do rd /s /q "%%i" >nul
for /f %%i in ('dir %mount%\Windows\assembly\8.0* /s /ad /b') do rd /s /q "%%i" >nul
for /d %%i in ("%mount%\Windows\assembly\NativeImages*") do rd /s /q "%%i" >nul
if "%remove.NET%" == "V" (
 for /f %%i in ('dir %mount%\Windows\assembly\GAC_32\2.0* /s /ad /b') do rd /s /q "%%i" >nul
 for /f %%i in ('dir %mount%\Windows\assembly\GAC_64\2.0* /s /ad /b') do rd /s /q "%%i" >nul
) else (
 REM Complete removal (including files in GAC_MSIL)
 for /f %%i in ('dir %mount%\Windows\assembly\2.0* /s /ad /b') do rd /s /q "%%i" >nul
)
del /f /q "%mount%\Windows\Microsoft.NET\Framework\*.*" >nul
for /d %%i in ("%mount%\Windows\Microsoft.NET\Framework\v1.*") do rd /s /q "%%i" >nul
if "%cb%" == "amd64" del /f /q "%mount%\Windows\Microsoft.NET\Framework64\*.*" >nul
REM Language folders and repository for x86 and (if present) amd64
for /f %%i in ('dir %mount%\Windows\Microsoft.NET\10?? /ad /s /b') do rd /s /q "%%i" >nul
for /f %%i in ('dir %mount%\Windows\Microsoft.NET\?? /ad /s /b') do rd /s /q "%%i" >nul
for /f %%i in ('dir %mount%\Windows\Microsoft.NET\ASP.NETWebAdminFiles /ad /s /b') do rd /s /q "%%i" >nul
REM Required for installation
REM for /f %%i in ('dir %mount%\Windows\Microsoft.NET\Config /ad /s /b') do rd /s /q "%%i" >nul
for /f %%i in ('dir %mount%\Windows\Microsoft.NET\GAC /ad /s /b') do rd /s /q "%%i" >nul
for /f %%i in ('dir %mount%\Windows\Microsoft.NET\MUI /ad /s /b') do rd /s /q "%%i" >nul
for /f %%i in ('dir %mount%\Windows\Microsoft.NET\MSBuild /ad /s /b') do rd /s /q "%%i" >nul
for /f %%i in ('dir %mount%\Windows\Microsoft.NET\RedistList /ad /s /b') do rd /s /q "%%i" >nul
for /f %%i in ('dir %mount%\Windows\Microsoft.NET\repository /ad /s /b') do rd /s /q "%%i" >nul
del /f /q %mount%\Windows\system32\dfshim.dll >nul
del /f /q %mount%\Windows\system32\netfxperf.dll >nul
del /f /s /q %mount%\Windows\system32\mscoree.dll >nul
del /f /s /q %mount%\Windows\system32\mscorier.dll >nul
rd /s /q %mount%\Windows\system32\MUI >nul
if "%cb%" == "amd64" (
 del /f /q %mount%\Windows\SysWow64\dfshim.dll >nul
 del /f /q %mount%\Windows\SysWow64\netfxperf.dll >nul
 REM Required for vLite
 if not "%remove.NET%" == "V" del /f /s /q %mount%\Windows\SysWow64\mscoree.dll >nul
 del /f /s /q %mount%\Windows\SysWow64\mscorier.dll >nul
 rd /s /q %mount%\Windows\SysWow64\MUI >nul
)
REM Removal of mscories.dll causes a non-fatal error with personalization upon first boot

REM Fonts
:fonts
del /f /s /q "%mount%\Windows\Fonts\angsa*.ttf" >nul
del /f /s /q "%mount%\Windows\Fonts\aparaj*.ttf" >nul
del /f /s /q "%mount%\Windows\Fonts\calibri*.ttf" >nul
del /f /s /q "%mount%\Windows\Fonts\cambria*.tt?" >nul
del /f /s /q "%mount%\Windows\Fonts\Candara*.ttf" >nul
del /f /s /q "%mount%\Windows\Fonts\comic*.ttf" >nul
del /f /s /q "%mount%\Windows\Fonts\consola*.ttf" >nul
del /f /s /q "%mount%\Windows\Fonts\constan*.ttf" >nul
del /f /s /q "%mount%\Windows\Fonts\corbel*.ttf" >nul
del /f /s /q "%mount%\Windows\Fonts\cordia*.ttf" >nul
del /f /s /q "%mount%\Windows\Fonts\daunpenh.ttf" >nul
del /f /s /q "%mount%\Windows\Fonts\dokchamp*.ttf" >nul
del /f /s /q "%mount%\Windows\Fonts\ebrima*.ttf" >nul
del /f /s /q "%mount%\Windows\Fonts\estr*.ttf" >nul
del /f /s /q "%mount%\Windows\Fonts\euphemia.ttf" >nul
del /f /s /q "%mount%\Windows\Fonts\framd*.ttf" >nul
del /f /s /q "%mount%\Windows\Fonts\Gabriola.ttf" >nul
del /f /s /q "%mount%\Windows\Fonts\gautami*.ttf" >nul
del /f /s /q "%mount%\Windows\Fonts\georgia*.ttf" >nul
del /f /s /q "%mount%\Windows\Fonts\gisha*.ttf" >nul
del /f /s /q "%mount%\Windows\Fonts\himalaya.ttf" >nul
del /f /s /q "%mount%\Windows\Fonts\impact.ttf" >nul
del /f /s /q "%mount%\Windows\Fonts\iskpota*.ttf" >nul
del /f /s /q "%mount%\Windows\Fonts\kalinga*.ttf" >nul
del /f /s /q "%mount%\Windows\Fonts\kartika*.ttf" >nul
del /f /s /q "%mount%\Windows\Fonts\KhmerUI*.ttf" >nul
del /f /s /q "%mount%\Windows\Fonts\kokila*.ttf" >nul
del /f /s /q "%mount%\Windows\Fonts\LaoUI*.ttf" >nul
del /f /s /q "%mount%\Windows\Fonts\latha*.ttf" >nul
del /f /s /q "%mount%\Windows\Fonts\leelaw*.ttf" >nul
del /f /s /q "%mount%\Windows\Fonts\l_10646.ttf" >nul
del /f /s /q "%mount%\Windows\Fonts\majalla*.ttf" >nul
del /f /s /q "%mount%\Windows\Fonts\malgun*.ttf" >nul
del /f /s /q "%mount%\Windows\Fonts\mangal*.ttf" >nul
del /f /s /q "%mount%\Windows\Fonts\monbaiti.ttf" >nul
del /f /s /q "%mount%\Windows\Fonts\moolbor*.ttf" >nul
del /f /s /q "%mount%\Windows\Fonts\msuighur.ttf" >nul
del /f /s /q "%mount%\Windows\Fonts\msyi.ttf" >nul
del /f /s /q "%mount%\Windows\Fonts\mvboli.ttf" >nul
del /f /s /q "%mount%\Windows\Fonts\ntailu*.ttf" >nul
del /f /s /q "%mount%\Windows\Fonts\nyala.ttf" >nul
del /f /s /q "%mount%\Windows\Fonts\pala*.ttf" >nul
del /f /s /q "%mount%\Windows\Fonts\phagspa*.ttf" >nul
del /f /s /q "%mount%\Windows\Fonts\plant*.ttf" >nul
del /f /s /q "%mount%\Windows\Fonts\raavi*.ttf" >nul
del /f /s /q "%mount%\Windows\Fonts\modern.fon" >nul
del /f /s /q "%mount%\Windows\Fonts\roman.fon" >nul
del /f /s /q "%mount%\Windows\Fonts\script.fon" >nul
del /f /s /q "%mount%\Windows\Fonts\segoepr*.ttf" >nul
del /f /s /q "%mount%\Windows\Fonts\segoesc*.ttf" >nul
del /f /s /q "%mount%\Windows\Fonts\Shonar*.ttf" >nul
del /f /s /q "%mount%\Windows\Fonts\shruti*.ttf" >nul
del /f /s /q "%mount%\Windows\Fonts\sylfaen.ttf" >nul
del /f /s /q "%mount%\Windows\Fonts\taile*.ttf" >nul
del /f /s /q "%mount%\Windows\Fonts\tunga*.ttf" >nul
del /f /s /q "%mount%\Windows\Fonts\utsaah*.ttf" >nul
del /f /s /q "%mount%\Windows\Fonts\vani*.ttf" >nul
del /f /s /q "%mount%\Windows\Fonts\vijaya*.ttf" >nul
del /f /s /q "%mount%\Windows\Fonts\vrinda*.ttf" >nul
for /d %%i in ("%mount%\Windows\winsxs\*-angsa*_*") do rd /s /q "%%i" >nul
for /d %%i in ("%mount%\Windows\winsxs\*-aparaj*_*") do rd /s /q "%%i" >nul
for /d %%i in ("%mount%\Windows\winsxs\*-calibri*_*") do rd /s /q "%%i" >nul
for /d %%i in ("%mount%\Windows\winsxs\*-cambria*_*") do rd /s /q "%%i" >nul
for /d %%i in ("%mount%\Windows\winsxs\*-Candara*_*") do rd /s /q "%%i" >nul
for /d %%i in ("%mount%\Windows\winsxs\*-comic*_*") do rd /s /q "%%i" >nul
for /d %%i in ("%mount%\Windows\winsxs\*-consola*_*") do rd /s /q "%%i" >nul
for /d %%i in ("%mount%\Windows\winsxs\*-constan*_*") do rd /s /q "%%i" >nul
for /d %%i in ("%mount%\Windows\winsxs\*-corbel*_*") do rd /s /q "%%i" >nul
for /d %%i in ("%mount%\Windows\winsxs\*-cordia*_*") do rd /s /q "%%i" >nul
for /d %%i in ("%mount%\Windows\winsxs\*-daunpenh_*") do rd /s /q "%%i" >nul
for /d %%i in ("%mount%\Windows\winsxs\*-dokchamp*_*") do rd /s /q "%%i" >nul
for /d %%i in ("%mount%\Windows\winsxs\*-ebrima*_*") do rd /s /q "%%i" >nul
for /d %%i in ("%mount%\Windows\winsxs\*-estr*_*") do rd /s /q "%%i" >nul
for /d %%i in ("%mount%\Windows\winsxs\*-euphemia_*") do rd /s /q "%%i" >nul
for /d %%i in ("%mount%\Windows\winsxs\*-franklingothic_*") do rd /s /q "%%i" >nul
for /d %%i in ("%mount%\Windows\winsxs\*-Gabriola_*") do rd /s /q "%%i" >nul
for /d %%i in ("%mount%\Windows\winsxs\*-gautami*_*") do rd /s /q "%%i" >nul
for /d %%i in ("%mount%\Windows\winsxs\*-georgia*_*") do rd /s /q "%%i" >nul
for /d %%i in ("%mount%\Windows\winsxs\*-gisha*_*") do rd /s /q "%%i" >nul
for /d %%i in ("%mount%\Windows\winsxs\*-microsofthimalaya_*") do rd /s /q "%%i" >nul
for /d %%i in ("%mount%\Windows\winsxs\*-impact_*") do rd /s /q "%%i" >nul
for /d %%i in ("%mount%\Windows\winsxs\*-iskoolapota_*") do rd /s /q "%%i" >nul
for /d %%i in ("%mount%\Windows\winsxs\*-kalinga*_*") do rd /s /q "%%i" >nul
for /d %%i in ("%mount%\Windows\winsxs\*-kartika*_*") do rd /s /q "%%i" >nul
for /d %%i in ("%mount%\Windows\winsxs\*-KhmerUI*_*") do rd /s /q "%%i" >nul
for /d %%i in ("%mount%\Windows\winsxs\*-kokila*_*") do rd /s /q "%%i" >nul
for /d %%i in ("%mount%\Windows\winsxs\*-LaoUI*_*") do rd /s /q "%%i" >nul
for /d %%i in ("%mount%\Windows\winsxs\*-latha*_*") do rd /s /q "%%i" >nul
for /d %%i in ("%mount%\Windows\winsxs\*-leelaw*_*") do rd /s /q "%%i" >nul
for /d %%i in ("%mount%\Windows\winsxs\*-lucidasans_*") do rd /s /q "%%i" >nul
for /d %%i in ("%mount%\Windows\winsxs\*-sakkalmajalla*_*") do rd /s /q "%%i" >nul
for /d %%i in ("%mount%\Windows\winsxs\*-malgun*_*") do rd /s /q "%%i" >nul
for /d %%i in ("%mount%\Windows\winsxs\*-mangal*_*") do rd /s /q "%%i" >nul
for /d %%i in ("%mount%\Windows\winsxs\*-mongolianbaiti_*") do rd /s /q "%%i" >nul
for /d %%i in ("%mount%\Windows\winsxs\*-moolbor*_*") do rd /s /q "%%i" >nul
for /d %%i in ("%mount%\Windows\winsxs\*-microsoftuighur_*") do rd /s /q "%%i" >nul
for /d %%i in ("%mount%\Windows\winsxs\*-yibaiti_*") do rd /s /q "%%i" >nul
for /d %%i in ("%mount%\Windows\winsxs\*-mvboli_*") do rd /s /q "%%i" >nul
for /d %%i in ("%mount%\Windows\winsxs\*-new_tai*_*") do rd /s /q "%%i" >nul
for /d %%i in ("%mount%\Windows\winsxs\*-nyala_*") do rd /s /q "%%i" >nul
for /d %%i in ("%mount%\Windows\winsxs\*-pala*_*") do rd /s /q "%%i" >nul
for /d %%i in ("%mount%\Windows\winsxs\*-phagspa*_*") do rd /s /q "%%i" >nul
for /d %%i in ("%mount%\Windows\winsxs\*-plant*_*") do rd /s /q "%%i" >nul
for /d %%i in ("%mount%\Windows\winsxs\*-raavi*_*") do rd /s /q "%%i" >nul
for /d %%i in ("%mount%\Windows\winsxs\*-segoepr*_*") do rd /s /q "%%i" >nul
for /d %%i in ("%mount%\Windows\winsxs\*-segoesc*_*") do rd /s /q "%%i" >nul
for /d %%i in ("%mount%\Windows\winsxs\*-Shonar*_*") do rd /s /q "%%i" >nul
for /d %%i in ("%mount%\Windows\winsxs\*-shruti*_*") do rd /s /q "%%i" >nul
for /d %%i in ("%mount%\Windows\winsxs\*-sylfaen_*") do rd /s /q "%%i" >nul
for /d %%i in ("%mount%\Windows\winsxs\*-tai_le*_*") do rd /s /q "%%i" >nul
for /d %%i in ("%mount%\Windows\winsxs\*-tunga*_*") do rd /s /q "%%i" >nul
for /d %%i in ("%mount%\Windows\winsxs\*-utsaah*_*") do rd /s /q "%%i" >nul
for /d %%i in ("%mount%\Windows\winsxs\*-vani*_*") do rd /s /q "%%i" >nul
for /d %%i in ("%mount%\Windows\winsxs\*-vijaya*_*") do rd /s /q "%%i" >nul
for /d %%i in ("%mount%\Windows\winsxs\*-vrinda*_*") do rd /s /q "%%i" >nul
del /f /s /q "%mount%\Windows\winsxs\Manifests\*-angsa*_*" >nul
del /f /s /q "%mount%\Windows\winsxs\Manifests\*-aparaj*_*" >nul
del /f /s /q "%mount%\Windows\winsxs\Manifests\*-calibri*_*" >nul
del /f /s /q "%mount%\Windows\winsxs\Manifests\*-cambria*_*" >nul
del /f /s /q "%mount%\Windows\winsxs\Manifests\*-Candara*_*" >nul
del /f /s /q "%mount%\Windows\winsxs\Manifests\*-comic*_*" >nul
del /f /s /q "%mount%\Windows\winsxs\Manifests\*-consola*_*" >nul
del /f /s /q "%mount%\Windows\winsxs\Manifests\*-constan*_*" >nul
del /f /s /q "%mount%\Windows\winsxs\Manifests\*-corbel*_*" >nul
del /f /s /q "%mount%\Windows\winsxs\Manifests\*-cordia*_*" >nul
del /f /s /q "%mount%\Windows\winsxs\Manifests\*-daunpenh_*" >nul
del /f /s /q "%mount%\Windows\winsxs\Manifests\*-dokchamp*_*" >nul
del /f /s /q "%mount%\Windows\winsxs\Manifests\*-ebrima*_*" >nul
del /f /s /q "%mount%\Windows\winsxs\Manifests\*-estr*_*" >nul
del /f /s /q "%mount%\Windows\winsxs\Manifests\*-euphemia_*" >nul
del /f /s /q "%mount%\Windows\winsxs\Manifests\*-franklingothic_*" >nul
del /f /s /q "%mount%\Windows\winsxs\Manifests\*-Gabriola_*" >nul
del /f /s /q "%mount%\Windows\winsxs\Manifests\*-gautami*_*" >nul
del /f /s /q "%mount%\Windows\winsxs\Manifests\*-georgia*_*" >nul
del /f /s /q "%mount%\Windows\winsxs\Manifests\*-gisha*_*" >nul
del /f /s /q "%mount%\Windows\winsxs\Manifests\*-microsofthimalaya_*" >nul
del /f /s /q "%mount%\Windows\winsxs\Manifests\*-impact_*" >nul
del /f /s /q "%mount%\Windows\winsxs\Manifests\*-iskoolapota_*" >nul
del /f /s /q "%mount%\Windows\winsxs\Manifests\*-kalinga*_*" >nul
del /f /s /q "%mount%\Windows\winsxs\Manifests\*-kartika*_*" >nul
del /f /s /q "%mount%\Windows\winsxs\Manifests\*-KhmerUI*_*" >nul
del /f /s /q "%mount%\Windows\winsxs\Manifests\*-kokila*_*" >nul
del /f /s /q "%mount%\Windows\winsxs\Manifests\*-LaoUI*_*" >nul
del /f /s /q "%mount%\Windows\winsxs\Manifests\*-latha*_*" >nul
del /f /s /q "%mount%\Windows\winsxs\Manifests\*-leelaw*_*" >nul
del /f /s /q "%mount%\Windows\winsxs\Manifests\*-lucidasans_*" >nul
del /f /s /q "%mount%\Windows\winsxs\Manifests\*-sakkalmajalla*_*" >nul
del /f /s /q "%mount%\Windows\winsxs\Manifests\*-malgun*_*" >nul
del /f /s /q "%mount%\Windows\winsxs\Manifests\*-mangal*_*" >nul
del /f /s /q "%mount%\Windows\winsxs\Manifests\*-mongolianbaiti_*" >nul
del /f /s /q "%mount%\Windows\winsxs\Manifests\*-moolbor*_*" >nul
del /f /s /q "%mount%\Windows\winsxs\Manifests\*-microsoftuighur_*" >nul
del /f /s /q "%mount%\Windows\winsxs\Manifests\*-yibaiti_*" >nul
del /f /s /q "%mount%\Windows\winsxs\Manifests\*-mvboli_*" >nul
del /f /s /q "%mount%\Windows\winsxs\Manifests\*-new_tai*_*" >nul
del /f /s /q "%mount%\Windows\winsxs\Manifests\*-nyala_*" >nul
del /f /s /q "%mount%\Windows\winsxs\Manifests\*-pala*_*" >nul
del /f /s /q "%mount%\Windows\winsxs\Manifests\*-phagspa*_*" >nul
del /f /s /q "%mount%\Windows\winsxs\Manifests\*-plant*_*" >nul
del /f /s /q "%mount%\Windows\winsxs\Manifests\*-raavi*_*" >nul
del /f /s /q "%mount%\Windows\winsxs\Manifests\*-segoepr*_*" >nul
del /f /s /q "%mount%\Windows\winsxs\Manifests\*-segoesc*_*" >nul
del /f /s /q "%mount%\Windows\winsxs\Manifests\*-Shonar*_*" >nul
del /f /s /q "%mount%\Windows\winsxs\Manifests\*-shruti*_*" >nul
del /f /s /q "%mount%\Windows\winsxs\Manifests\*-sylfaen_*" >nul
del /f /s /q "%mount%\Windows\winsxs\Manifests\*-tai_le*_*" >nul
del /f /s /q "%mount%\Windows\winsxs\Manifests\*-tunga*_*" >nul
del /f /s /q "%mount%\Windows\winsxs\Manifests\*-utsaah*_*" >nul
del /f /s /q "%mount%\Windows\winsxs\Manifests\*-vani*_*" >nul
del /f /s /q "%mount%\Windows\winsxs\Manifests\*-vijaya*_*" >nul
del /f /s /q "%mount%\Windows\winsxs\Manifests\*-vrinda*_*" >nul
if "%1" == "cleanup" goto unmount 

REM Driver integration (post-vLite, final step prefereable)
REM ----------------------------------------------------------------------------
:drivers
%mountimage%
%dism% /image:"%mount%" /add-driver /driver:"%driverloc%" /recurse
goto unmount

REM Languagepack integration (pre-vLite)
REM ----------------------------------------------------------------------------
:langpack
%mountimage%
%dism% /image:"%mount%" /add-package /packagepath:"%DVD%\original\lp7264x64.cab"

REM Windows Language
%intlcfg% -all:%lang% -image:%mount%
%intlcfg% -genlangini -dist:"%DVD%" -image:%mount%
%intlcfg% -defaultlang:%lang% -dist:"%DVD%"
%unmountimage%

REM Setup Language
echo Integration of Language pack into setup Language not fully automated (yet)
echo Extract the following files from "%langloc%\lp7264x64.cab":
echo "setup\sources\%lang%\*.*" -> "%langloc%\setup\sources\%lang%\*.*"
echo "sources\license\*.*" -> "%langloc%\sources\license\*.*"
echo When using different paths, rename these within "%0" and use:
echo "%0" langpack2
goto unmount

:langpack2
%imagex% /mountrw "%sources%\boot.wim" 2 "%mount%"
xcopy "%sources%\lang.ini" "%mount%\sources" /cheryki
mkdir "%mount%\sources\%lang%"
xcopy "%langloc%\setup\sources\%lang%\*.*" "%mount%\sources\%lang%" /cheryki
xcopy "%langloc%\sources\license\*.*" "%mount%\sources\license" /cheryki
%unmountimagex%
goto unmount

REM Actions under the freshly installed Windows (post-installation)
:final
REM Register file required for safe removal and proper explorer functionality
if exist "%SystemRoot%\system32\ieproxy.dll" regsvr32 /s "%SystemRoot%\system32\ieproxy.dll"
REM Remove Microsoft.NET files, but keeping those used by vLite
if "%remove.NET" == "K" goto end
takeown /f "%SystemRoot%\assembly\NativeImages*" /r >nul
icacls "%SystemRoot%\assembly\NativeImages*" /grant Administrators:F /t /q >nul
for /d %%i in ("%SystemRoot%\assembly\NativeImages*") do rd /s /q "%%i" >nul
takeown /f "%SystemRoot%\Microsoft.NET" /r >nul
icacls "%SystemRoot%\Microsoft.NET" /grant Administrators:F /t /q >nul
rd /s /q "%SystemRoot%\Microsoft.NET\Framework64" >nul
for /f %%i in ('dir %SystemRoot%\Microsoft.NET\Config /ad /s /b') do rd /s /q "%%i" >nul
set dn=%SystemRoot%\Microsoft.NET\Framework\v2.0.50727
mkdir "%dn%\Temp"
move /y "%dn%\fusion.dll" "%dn%\Temp" >nul
move /y "%dn%\mscorie.dll" "%dn%\Temp" >nul
move /y "%dn%\mscorjit.dll" "%dn%\Temp" >nul
move /y "%dn%\mscorlib.dll" "%dn%\Temp" >nul
move /y "%dn%\mscorrc.dll" "%dn%\Temp" >nul
move /y "%dn%\mscorwks.dll" "%dn%\Temp" >nul
move /y "%dn%\sort*.nlp" "%dn%\Temp" >nul
del /f /q "%dn%\*.*" >nul
move /y "%dn%\Temp\*.*" "%dn%" >nul
rd /s /q "%dn%\Temp"
takeown /f "%SystemRoot%\system32\mscories.dll" >nul
takeown /f "%SystemRoot%\SysWow64\mscories.dll" >nul
icacls "%SystemRoot%\system32\mscories.dll" /grant Administrators:F /q >nul
icacls "%SystemRoot%\Syswow64\mscories.dll" /grant Administrators:F /q >nul
del /f /q "%SystemRoot%\system32\mscories.dll" >nul
del /f /q "%SystemRoot%\SysWow64\mscories.dll" >nul
goto unmount

REM Commit the image if all went wel (pre-vLite)
REM ----------------------------------------------------------------------------
:unmount
if not errorlevel 1 %unmountimage%
if exist "%mount%\Windows" echo An error occured, please commit/discard your image manually

:end

Can you please help me Jeronimo posting here a custom REMOVAL.BAT for my needs? :}

This post has been edited by Cr4z33: 16 September 2009 - 11:59 AM


Share this topic:


  • 11 Pages +
  • « First
  • 5
  • 6
  • 7
  • 8
  • 9
  • Last »
  • You cannot start a new topic
  • You cannot reply to this topic

3 User(s) are reading this topic
0 members, 3 guests, 0 anonymous users



All trademarks mentioned on this page are the property of their respective owners
Copyright © 2001 - 2011 msfn.org
Privacy Policy