====== HOWTO: Move Vista's Side by Side Directory ====== ===== Foreword ===== A couple months back a How to was created that briefly described how to relocate the Windows Vista Side by Side (winsxs) directory to another drive to save disk space on the Eee PC's internal Solid State Disk. For "tech savy" individuals, the guide provided enough information to get winsxs moved, but people with less experience have been fraught with frustration in attempting the process. ==== WARNING ==== Relocating your winsxs directory can dramatically reduce the amount of disk space Vista consumes on the Eee PC SSD. However, at the time of this writing, it breaks Vista's ability to perform Windows Updates because of a limitation in Windows Update that prevents it from copying across volumes. Also, slipstreaming any outstanding hotfixes to [[http://www.vlite.net|VLited]] media, or using the Integrated Vista SP1 installation media is arguably preferable to moving winsxs. (//the author of this document has chosen to no longer relocate winsxs//) The WinSxS directory also contains a lot of hardlinks to other files on the SSD. This means that while the file may appear to be present in two or more locations, it is only being stored on the SSD once, with a "link" from the different locations that point to it. This functionality breaks if the directory is moved to a different volume. For more information on WinSxS check out this [[http://blogs.technet.com/askcore/archive/2008/09/17/what-is-the-winsxs-directory-in-windows-2008-and-windows-vista-and-why-is-it-so-large.aspx? |Technet blog]], [[http://blogs.msdn.com/e7/archive/2008/11/19/disk-space.aspx|Engineering Windows 7 blog]]. Please read this background information before decided whether to follow this HOWTO". You may also experience seemingly random Blue Screen Of Death system halts on boot up after following this procedure. The author has noted that these faults happen more often with Flash media and has been able to minimize them by performing the steps outlined in the guide on how to trick Vista into thinking that your flash/sdhc media is a physical drive and by raising its device driver's startup prioirty. //How To not yet available -- will be soon// The information contained in this document could potentially harm your computer, either by an error on the part of the author, or the individual (you) attempting to follow the directions it provides. __**PROCEED AT YOUR OWN RISK**__ ===== Prerequisites ===== In order to successfully relocate winsxs, the following items are necessary: * Functioning Eee PC Vista installation * USB Flash or SDHC Card (2GB or higher) * [[http://www.microsoft.com/technet/sysinternals/fileanddisk/pendmoves.mspx|MoveFile and PendMoves]] * Windows Vista Install CD (Disk 1 or Full DVD) - //Optional// Plug in your USB Flash or SDHC card. From this point on, the flash/sdhc card must always be connected when using your computer. For this reason, you may want to consider following the guide on how to trick Vista into thinking that it is a physical drive. This may also be necessary depending on your configuration, especially if you find that your computer is periodically crashing with a Blue Screen Of Death at boot up, indicating an Initial Process process failure. //How To not yet available -- will be soon// Download MoveFile and PendMoves, extract them, and put them in your Windows (C:\Windows) directory. This will put them in your system "path" and enable us to execute them from anywhere on your computer. Optionally, have your original Windows Vista Install CD handy. Ideally, you will not need it, but if you run into problems, it will significantly shorten the time it takes to recover. With the Vista CD/DVD, you should be able to recover from just about any failure that occurs while performing this process (assuming it was something you did as part of this process to cause a problem). ===== Procedure ===== ==== Create Symbolic Directory Link ==== In this step we will create a Symbolic Link that we will eventually use to "fake" Vista into thinking is the winsxs directory on your SSD, when in reality points to another drive. Open up an Elevated Console Window (Start-->All Programs-->Accessories-->Command Prompt) by right clicking on Command Prompt, and selecting "Run As Administrator". {{howto:move-winsxs-1.jpg?650|Create Symbolic Directory Link}} Navigate to your Windows Directory: ''CD\Windows'' Create a symbolic directory link for winsxs: ''mklink /D winsxs.link winsxs.moved'' Verify that the symbolic directory link was created correctly: ''dir wins*'' ==== Take Ownership of winsxs ==== In this step we will secure ownership of the winsxs directory and all children objects within it. This is necessary because Vista likes to make life dificult for us by securing everything under a bogus account named //TrustedInstaller//. To take ownership of winsxs, follow the below steps: Open a Windows Explorer window (Start-->All Programs-->Accessories-->Windows Explorer), navigate to C:\Windows\winsxs, right click on the winsxs directory, select //Properties//, go to the resulting //Security// tab, and click the //Advanced// button contained there. {{howto:move-winsxs-2.jpg|Take ownership of winsxs}} Click //Edit//, select "Administrators" from the list of potential owners, click the //Replace owner on subcontainer and objects// checkbox, then click the //OK// button. After a couple minutes you'll be presented with a Window informing you that you need to close all property dialogs for the ownership changes to be visible. Follow this advice by clicking the //OK// button in the File //Properties// window and you should now be back at the Windows Explorer window you originally opened. ==== Give Yourself Full Control of winsxs ==== Right Click on the winsxs directory and select //Properties// one additional time. Go to the //Security// tab, and click the //Advanced// button again also. {{howto:move-winsxs-3.jpg?650|Give Yourself Full Control of winsxs}} Click the //Add..// button in the //Permissions// tab, type in **Administrators** as the name (ensure your Local Computer domain is selected), and select //Full control// from the list of available permissions. Click //OK// out of the Permission Entry dialog, select //Replace all existing inheritable permissions on all descendants...// then click //OK// from the Advanced dialog. After a couple minutes you should once again be back at the File Properties dialog. Feel free to click //OK// and close Windows Explorer. ==== Schedule File Moves ==== Open up an Elevated Console Window (Start-->All Programs-->Accessories-->Command Prompt) by right clicking on Command Prompt, and selecting "Run As Administrator". {{howto:move-winsxs-4.jpg?650|Schedule File Moves}} Navigate to your Windows Directory: ''CD\Windows'' Schedule the move of //winsxs// to //winsxs.moved//: ''movefile C:\Windows\winsxs C:\Windows\winsxs.moved'' Schedule the move of //winsxs.link// to //winsxs//: ''movefile C:\Windows\winsxs.link C:\Windows\winsxs'' Verify that they're properly scheduled with **PendMoves**: ''pendmoves'' {{howto:move-winsxs-5.jpg?650|Verify Scheduled File Moves}} **REBOOT** ==== Copy winsxs to your SDHC or Flash Drive ==== Assuming you've followed the steps properly up to this point, you will be able to log back in as if nothing has changed. If you haven't, you're probably sitting at a Blue Screen Of Death. Visit the //Troubleshooting// section of this guide for help. Open up an Elevated Console Window (Start-->All Programs-->Accessories-->Command Prompt) by right clicking on Command Prompt, and selecting "Run As Administrator". {{howto:move-winsxs-6.jpg?650|Copy winsxs to your SDHC or Flash Drive}} Use **ROBOCOPY** to copy your winsxs directory to your SDHC or Flash drive: ''robocopy C:\Windows\winsxs.moved **X**:\Windows\winsxs /E /COPYALL /SEC'' Substitute the actual drive letter you've assigned for your Flash or SDHC drive for **X** in the above example. Grab a beer, smoke if ya got 'em... 15-20 minutes later you should have an exact copy of your winsxs directory on your Flash or SDHC drive. {{howto:move-winsxs-7.jpg?650|Verify winsxs copy to your SDHC or Flash Drive}} {{howto:move-winsxs-8.jpg?650|Verify winsxs copy to your SDHC or Flash Drive}} ==== Repoint winsxs to your Flash or SDHC drive ==== Now that you've got everything //wired// up, it's time to cutover to your new winsxs installation. To do so we're going to proceed with another Console Window (you can use the one you had open for the robocopy). Open up an Elevated Console Window (Start-->All Programs-->Accessories-->Command Prompt) by right clicking on Command Prompt, and selecting "Run As Administrator". {{howto:move-winsxs-9.jpg?650|Copy winsxs to your SDHC or Flash Drive}} Navigate to your Windows directory: ''cd\windows'' Remove the winsxs link to winsxs.moved: ''rmdir winsxs'' Make a new link to **X**:\Windows\winsxs: ''mklink /D winsxs **X**:\Windows\winsxs'' *Replace **X** with the actual drive letter of your Flash or SDHC drive. Reboot again and you should now be able to remove the **C:\Windows\winsxs.moved** directory. The easiest way to accomplish this is by opening a Windows Explorer window, navigate to your C:\Windows direcotry, select winsxs.moved, and delete it. If for some reason your unable to remove all files from winsxs.moved, try rebooting an additional time. If you are still unable to remove the entire directory, see the //Troubleshooting// section of this guide. ===== Troubleshooting ===== ==== No matter what I try, my computer blue screens on boot every boot ==== This condition is typically caused because you've pointed winsxs to a location that doesn't exist, or doesn't contain the intended contents of the winsxs directory. The easiest way to resolve this issue is to boot from your original (non-vlite) Vista Installation CD/DVD and select its //Repair computer// option. If it asks you to fix your computer and automatically restart, decline. Select the //Command Prompt// recovery option, navigate to your C:\Windows directory: ''cd\windows'' And verify that your winsxs paths are all correct: ''dir wins*'' If they are not correct, make the necessary changes and reboot. If you decide to throw in the towel (give up), remove the winsxs symbolic link (if it is a symlink) and move winsxs.moved back to winsxs: ''move winsxs.moved winsxs'' ==== My computer periodically blue screens on boot ==== Follow //this// guide once it is created.