Posts Tagged ‘windows’

Compress WinSxS

November 16, 2013 Leave a comment

This post is awesome. My Windows Seven virtual machine will finally fit on my usb key. I just copy the commands here for the record, and I group them so they can be easily copied to a .bat file.

REM Stop and disable Windows Installer and Windows Module Installer services
sc stop msiserver
sc stop TrustedInstaller

REM Backup ACLs for WinSxS folder (see icacls), so we can restore later
icacls "%WINDIR%\WinSxS" /save "%WINDIR%\WinSxS.acl" /t

REM Take ownership of WinSxS and subfolders
takeown /f "%WINDIR%\WinSxS" /r

REM Grant full rights on WinSxS to your user
icacls "%WINDIR%\WinSxS" /grant "%USERDOMAIN%\%USERNAME%":(F) /t

REM Compress WinSxS files and sub-folders
compact /s:"%WINDIR%\WinSxS" /c /a /i *

REM Restore ACLs for WinSxS folder we saved earlier.
icacls "%WINDIR%" /restore "%WINDIR%\WinSxS.acl"

REM Restore Windows Installer and Windows Module Installer services
sc config msiserver start= demand
sc config TrustedInstaller start= demand
Tags: ,

Windows Seven 0x7B blue screen error in Virtualbox

November 10, 2013 Leave a comment

I’ve just converted a Windows Seven physical desktop to a virtual machine using VMware converter. It’s a great piece of software because it work at file system level so it can:

  • Create a unencryped VM of a Bitlocker encrypted physical machine
  • Save the image of a disk, on the disk it self.

The created image can be used in Virtualbox, but before doing so some disk drivers may need to be enabled else you’ll get a BSOD with:


It’s easier to enable the drivers from the physical system, before creating the disk image. To do so run regedit and set the following keys:

  • HKLM\System\ControlSet001\msahci\Start=0
  • HKLM\System\ControlSet001\intelide\Start=0

I guess that 0 mean enabled and 3 mean disabled. I’m almost sure that intelide is not required if you setup the virtual disk as a SATA device. I don’t know which one of ControlSet001 or ControlSet002 so I edited both.

If, as I did, you forgot to enable those drivers before creating the disk image, it’s possible to do it after. Although I’m sure it’s possible, I’ve not been able to do it from the recovery console. So I added the disk image to an other Windows Seven virtual machine, let’s say as the G:\ drive. Then:

  • Run regedit
  • Select a root key (any of them)
  • File, Load Hive, and select G:\Windows\System32\config\SYSTEM
  • Give a name, let’s say DUMMY
  • Edit the keys as previously explained
  • Select the DUMMY key, File, Unload Hive