Edit 05/05/2011 - Having run this on all of my machines, I can't see anything to show that they're not now fully working. Also, setting the permissions (the long winded stage 4) doesn't seem to be necessary.
Yesterday I came up with a possible fix for getting SP1 correctly installed on a torn machine. I posted a very brief overview of what I'd done over on The Windows Servicing Guy's blog. Here are a more in-depth set of steps and instructions for those who are interested.
Part 1 - Ascertaining if you've got the same problem I did
- On a torn PC try to install SP1 from the the full file available at http://www.microsoft.com/downloads/en/details.aspx?FamilyID=c3202ce6-4056-4059-8a1b-3a9b77cdfdda
- When it fails, check the log at %windir%\Logs\CBS\CBS.log. If you've got the same error I have on all of my torn machines you should see something similar to this towards the end of the log:
Part 2 - Get the missing folder
- Get hold of your original Windows 7 Installation media.
- Download 7zip and install.
- In 7zip file manager navigate to the sources folder on your installation media and double click install.wim. 7zip will expand the wim file.
- You'll now see a few folders and an xml file. The xml file will tell you which folder you need for your version of windows. In my case folder 3 is Windows 7 Pro
- Browse to the FileRepository folder in the appropriate image and copy out the missing folder to a usb drive. In my case this would be the atiilhag.inf_amd64_neutral_951c1812f542740a folder in D:\sources\install.wim\3\Windows\System32\DriverStore\FileRepository\. I made sure that the ati folder was in its own sub folder on the usb drive as I'm lazy and it made it easier copying it in the next part.
Part 3 - Get the missing folder back in place
- Boot from your Windows 7 media into recovery console.
- Plug in your USB drive.
- Ascertain the drive letters you're gong to be working with. (If you're a GUI person you can always launch notepad.exe from the command prompt to look at drive letters).
- From the command prompt use xcopy to put the atiilhag.inf_amd64_neutral_951c1812f542740a folder back into the FileRepository folder. As an example, I executed the following commands:
xcopy *.* /e d:
- exit and restart into windows.
Browse to %windir%\System32\DriverStore\FileRepository Open the properties for the atiilhag.inf_amd64_neutral_951c1812f542740a folder. On the security tab click Advanced, then Owner then the Edit button. Change the owner to Administrators, check "Replace Owner on subcontainers & objects". Click OK 3 times. (Back in the Security tab now) Click Edit then Add. Change the location to your local PC. Type the following into the "Enter object names to select" box: Administrators; Users; NT SERVICE\TrustedInstaller Click OK then give TrustedInstaller Full Control. Click OK and then Yes. Click Advanced and then Change permissions. Uncheck "Include inheritable permissions..." then click the Add button. Remove permissions for the Everyone group. Click OK and then Yes. Back on the Owner Tab click Edit then click Other users and groups. Change the location to the local PC, Enter NT SERVICE\TrustedInstaller into the "Enter object names to select" box and click OK. Check "Replace Owner on subcontainers..." and click OK
Phew! That's the Files in the folder all now set with the right permissions. Nearly there... Click Edit again. Change the owner to Administrators and click OK and OK again (NOTE: do NOT appy to subcontainers!) On the Permissions tab click Change Permissions. Check "Include Inheritable..." and then click Apply and Yes followed by Continue 19 times (as it can't and shouldn't apply to any of the files) Remove all of the "<not inherited>" permissions, Click OK, Yes and then Continue 19 times again. Back on the Owner tab click Edit and then Other users or Groups. Click Location, change it to the Local PC and click OK. Enter SYSTEM in the "Enter object names to select" box and then click OK 5 times until all properties windows are closed.
Part 5 - Remove the partially installed Service Pack
- Launch an administrative command prompt (Right-click on Command Prompt in the Start Menu and click "Run as Administrator")
- At the prompt type dism /online /remove-package /packagename:Package_for_KB976932~31bf3856ad264e35~amd64~~18.104.22.16814
- Hit enter.
- After a while you'll be prompted to reboot. Type Y to do so.
Part 6 - Install Service Pack 1
- Launch the SP install from the file you downloaded back in Part 1. With a bit of luck, all should be well.
That's it it's worked on every machine I've tried it on so far. Fingers crossed it helps you too!