PDA

View Full Version : Tip: How to remove Winsxs folder from Win Vista


needer
11-16-2008, 03:13 PM
There`s a big winsxs folder in Windows dir.This is a WHOLE Windows Vista installation.It is used for some compatibility for programs.Here is instructions.

Not made by me.


WARNING: Proceed at your own risk. Incorrectly performing the following procedure may cause irreversible damage to your OS. It is highly recommended to backup your system before proceeding.



1. You will need two utilities: PendMoves and MoveFile. Place them in \Windows\System32 directory for easy access.

Procedure:
1. In Windows Explorer navigate to the \Windows\WinSXS directory. Right click the directory to bring up the quick menu and select Properties. Click the Security tab to view the security properties. You will need to assign the Administrator user account ownership of the directory and then grant the Administrators group Full Access.

2. Open an administrator command prompt, and create a dummy directory. Execute “mkdir c:\windows\winsxs.moved“

3. Next, create a junction (like a Symbolic link for Vista). Execute “mklink /J c:\windows\winsxs.link winsxs.moved“

4. Now delete the winsxs.moved directory. Execute “rmdir c:\windows\winsxs.moved“

5. Now we will use MoveFile to schedule renaming of the WinSXS directory at reboot. This is the magic that will give us control over the directory.

6. From the administrator command prompt, execute “movefile c:\windows\winsxs c:\windows\winsxs.moved“. As you can see, this is renaming the WinSxS directory before Vista can get a lock.

7. From the command prompt, run “movefile c:\windows\winsxs.link c:\windows\winsxs“. This puts a winsxs directory back (as far as Vista is concerned), so everything doesn’t collapse in a heap.

8. From the command prompt, run “pendmoves“. It will show the two pending moves you’ve entered above, with NO ERRORS. If it all looks good, REBOOT!

9. On reboot the critical renames/moves will execute, and the WinSxS directory will be unlocked and able to be moved in the next steps.

10. Open an administrator command prompt, and execute “dir c:\windows\winsxs*“. If you performed the previous steps correctly, you’ll see a WinSxS.moved directory and the WinSxS junction. If it did not work, repeat the above steps. Our next step is to relocate the WinSXS directory and amend the junction.

11. Using Windows Explorer, COPY the entire WinSxS.moved directory to a \Windows directory on another partition or drive.

12. When the copy is finished, rename the new directory from WinSxS.moved to WinSxS.

13. Go to an administrator command prompt and execute “rmdir c:\windows\winsxs“.

14. Then, execute “mklink /J c:\windows\winsxs d:\windows\winsxs“.

15. To be sure everything is happy, in Windows Explorer browse to c:\windows\winsxs. You will see all of the files. (Even though they are actually on your other partition or drive)

16. Reboot
17. After reboot, you should be able to delete c:\windows\winsxs.moved and FINALLY liberate all that disk space. Whew! Now take a bow.

This process can also be applied to the Windows Updates directory. When you download Windows Updates etc., the files get placed into C:\Windows\SoftwareDistribution, and this will quickly become huge. It is easier though… stop the Automatic Update service, move directory, create junction, restart service, DONE!


Vista installation is :eek2: big.You can light it up with vLite.

DST2208
11-16-2008, 04:12 PM
vLite is much safer than emptying winsxs folder. Here is why it isn't best idea:
But, why so many subfolders, and why keep so many different versions of the same dll, exe or other files ?
As mentioned, Windows stores the old dll's and library components in the WinSxS folder. Now if a newer version of this file is a part of the OS, but a particular application requires a particular older version for running, then the older version from the winsxs folder will be used, leaving the newer version in its present place, for other applications which may require it.

So obviously you cannot delete this directory or move it elsewhere. Nor is it advisable to delete anything here, as such a step could probably make your applications un-workable or even break your system! If you have many applications installed, you can expect to have a jumbo sized winsxs folder.

If you delete components from the WinSxS folder like the manifets or the assemblies, etc, you could be in trouble. Each system would react differently. What may work for one could break another! For instance, if you install a program that requires that particular assembly, which you may have deleted, then that program will just not run! Compressing the folder is also a no-no, as it could cause problems during WindowsUpdates or while installing a Hotfix.
The safest way to clean it, is by simply uninstalling applications which you don't require. However, this too is not fool proof, as many applications still leave behind their files here, since they may be shared between other applications. So the probability of dud unused dll's being left behind is quite high.

And if you are into trying out new software or installing and uninstalling frequently, you may notice that your winsxs size is indeed large, as Vista will store multiple copies of these dll files, in order to let multiple applications without compatibility problem.
Source: http://www.winvistaclub.com/f16.html

Did that once and regretted it. Later restored it back.

Random
11-18-2008, 11:26 AM
Lol, strangely enough I was looking for the Winsxs folder on someone's laptop that had somehow deleted a load of driver files, only to find he had deleted it. :p

essexman
02-01-2009, 03:31 PM
has anyone done the above and not had a problem. mime is taking up 11GB and i think this is taking the p*** a little now. when do u need this folder? when something goes wrong and u need to do a system restore??