Archive for the ‘Vista’ Category

6 days of recovery – day 6: Recovering security permissions after restoring data on a new hard drive

Okay, I’ve now got the Windows system drive (C:) back up and running and using my trusty backup I have restored all my data onto the new data drive (A Seagate 1TB 7200RPM 32MB cache – nice and fast).  However, I now had a security problem:  all my old file permissions were now incorrect, and in the directory and file properties windows on the security tab I was getting “Account Unknown”:

Windows Vista Security file properties: Account Unknown

The problem was that although my user name was the same in the new Windows install, the unique Security ID (SID) used by my old Windows install was different from the unique Security ID created by the new Windows install.  This makes sense because the ID is a unique identifier (and is probably created based on the current time in milliseconds and lots of other things).

BTW, It’s possible to copy-and-paste that long numeric SID rather than trying to type it out.  From the file security property dialog box above click on the “Advanced” button, and then double-click on the “Account Unknown” in the “Permission entries” pane.  Then, you can copy the long numeric SID from the “Name” text box.

How to copy the numeric SID for an Account Unknown

My first approach was just to remove all the “Account Unknown” entries completely with the iacls command but I got a VERY frustrating message:

D:\>icacls * /remove *S-1-5-21-671368754-1592612355-3076361259-1000 /T
Successfully processed 0 files; Failed processing 0 files

I tried about 50 different variations and got absolutely nowhere, which turned out to be very fortunate because I discovered that it’s possible to simply REPLACE the OLD broken SID with the working new one!  Phew.  A little Microsoft tool called subinacl.exe did the trick very nicely.  It requires installation (?!) and doesn’t put itself onto the path (which is good I guess) and after reading the help and trying a few different things I got it to work like this:

"c:\Program Files (x86)\Windows Resource Kits\Tools\subinacl.exe" /subdirectories d:\

So it took a little while to solve the problem but it worked!  It’s also the ONLY Microsoft Vista command line tool I’ve ever seen that actually had a “fancy” little GUI:

Subinacl at work

The red is a little scary (because I assumed something bad had happened), but it was fine and my new HDD with all my data had all the security backed up correctly, and I didn’t have to muck around trying to remember and manually reset folder permissions.  Very elegant, although it took me about an hour to figure this out!


MS SQL Server 2005 SP3 Cumulative Hotfix (KB970892) – PAINFULL

What a pain!  Last Tuesday, 2009-10-13, Microsoft released a whole bunch of patches, my computer apparently needed 19 (?!) security patches.  One of them failed dramatically, and I’ve spent the last two weeks trying to get this security patch to install.  This is “MS SQL Server 2005 SP3 Cumulative Hotfix (KB970892)”, and I can not believe how difficult this has been to install.

My first approach was just to download the hotfix separately from here:

I’m running Vista Ultimate x64, so I downloaded the x64 version.  However, when I selected my database “MSSMLBIX – SQL Server Database Services 2005” the details section says that:

Setup cannot update SQL Server Database Services 2005 x86 on this computer. To proceed, run the Hotfix Setup program for the x86 platform instead.

(Which is odd, because later I tried a re-install of SQL Server Express 2005 and I could ONLY run the x64 bit version).   So I dutifully downloaded the x86 version of the KB970892 hotfix.  Here’s a video of the results:


Problem Event Name:   APPCRASH
Application Name:           hotfix.exe
Application Version:       1.4.1572.0
Application Timestamp:  4919b4d5
Fault Module Name:      StackHash_e52f
Fault Module Version:
Fault Module Timestamp: 00000000
Exception code:                c0000005
Exception Offset:             002d002d
Additional information 1:              e52f

The knowledge base article had links to a number of suggestions, such as setting ALL SQL Server windows services to start up automatically, however that didn’t work for me.

VERY BAD Microsoft Support

So yesterday, I finally called Microsoft Support at 1-866-PCSAFETY and I spent from 11am until 4:30pm on the phone!  Fortunately I just put them on speaker phone and worked on my laptop, but it was still an unbelievably frustrating experience!  First I talked with Lance, but after about 30 minutes the call was cut off and I was left with a dial tone.  I waited for about 20 minutes but he never called back.

Then I talked with Angie (who seemed to be much more persistent and friendly), and after trying a bunch of stuff (some of it the same as Lance) she transferred me to Ruchi, who seemed to be slightly more knowledgeable.  Ruchi  tried to uninstall SQL Server 2008.  The SQL Server 2005 instance that’s running on my machine was installed with Microsoft Office Small Business, and I’ve also installed SQL Server 2008 express as part of my development environment.   Unfortunately most of the SQL Server 2008 stuff failed to uninstall half way through the uninstall; she had also renamed a bunch of directories (c:\windows\SoftwareDistribution and c:\windows\system32\catroot), and run a few batch files that changed directory permissions to “Everybody” so that when the call was disconnected (!) my machine was left in a very indeterminate/messy state!!  All the calls (obviously to somewhere very far away) had very bad connections, and the line was full of static, crackles and pops and I could barely hear them and they could barely hear me, so I’m not terribly surprised that these calls kept being disconnected, except that I didn’t have a case number and now I had a computer in a really bad state.   What was (slightly) amusing is that they all kept saying, “is your phone okay, it seems to be bad” – how strange that if I call anybody in Canada or the USA my phone seems just fine…

Anyway, about an hour after that call was disconnected another gentleman called me and asked me a bunch of questions and had no interest in using Microsoft Easy Assist to connect to my computer (he actually trusted me).  However he finally gave up and suggested I try the paid SQL Server support team’s support.  It doesn’t seem “right” to pay for help fixing the mess their support people created on my computer trying to fix a security fix that they wrote that apparently lots of other people are having problems with!

Trying myself (again)

So I thought about the problem for a while, and decided to uninstall SQL Server 2005 – I haven’t used the small-business side of Office for a while, and I secretly wondered if it might not connect to a (repaired) SQL Server 2008 instance instead.  Unfortunately  I couldn’t uninstall SQL Server 2005, because it said there was a registry problem.

So instead I decided to re-install SQL Server 2005, and I downloaded it from here:

I figured after my previous experience with the hot fix installer that I needed the x86 version, but that wouldn’t install so I downloaded the x64 version and that installed just fine.

Then Windows Update said it successfully installed the update!  Unfortunately, after rebooting and asking Windows Update to “Check for Updates” it found “MS SQL Server 2005 SP3 Cumulative Hotfix” again!!  Sigh.

So I then installed the KB update that I had downloaded again (the x86 one that crashed in the video above) and it worked!!    This time there was two instances of the database present, the SQL Express version which the hot fix installed indicated was already updated, but the MSSMLBIX version was “Upgradable”.  The update didn’t crash, and everything seemed to be working.  I rebooted the computer and did another Windows Update and it immediately said that 1 important update was available – the same one!!  Wow, this is almost impossible to fix!

I now just found now found this on Google:  I decided to try their suggestion (voted on by several people) of the Microsoft Installer cleanup utility to remove ALL SQL installation files and then running the update again:

I used this tool to remove the following:

Microsoft SQL Server 2005 Express Edition [9.3.4035.00] (I had two copies of this?  I removed both – in hindsight maybe removing just one would have been best)

Microsoft SQL Server 2005 Tools Express Edition [9.3.4035.00]

Microsoft SQL Server Native Client [9.00.4035.00]

Microsoft SQL Server Setup Support Files (English) [9.00.4035.00]

So I tried running the update from Windows Update (as recommended in the blog post), and that seemed to work.  Unfortunately after I rebooted and it STILL had 1 important security update!!  Sigh.

Apparently this also broke Office, because Office now has to “install” and re-configure itself.  It’s now done this twice and it still won’t start.  I now get the error message, “Microsoft Office Word has not been installed for the current user.  Please run setup to install the application”:

Microsoft Office Word has not been installed for the current user.  Please run setup to install the application

Microsoft Office Word has not been installed for the current user. Please run setup to install the application

I popped in  my MS-Office 2007 DVD and clicked “Repair”, but unfortunately even that failed!

So I decided to try and re-install SQL Server 2005.  Unfortunately, now I get the error:

Error 1603 installing Microsoft SQL Server 2005 Setup Support Files.

So after fighting with that bug for a while I’ve decided to buy a 1TB drive (I was getting low on space anyway) and reinstall Windows.  This SUCKS!!!


2009-10-31:  Update

I just received this nice little form e-mail from Microsoft support.

Dear Robert,

Thank you very much for your reply. I’m glad to hear that the issue is resolved. It was a pleasure working with you and I hope you will continue to enjoy using our products.

We always strive to provide a high level of support to our customers and hope you are satisfied with the entire process of this service request. If there is anything you are not satisfied with, please don’t hesitate to let us know. Your feedback is very valuable in helping us to improve our service process and quality. Our goal is to provide first class customer service to you. We do our best to keep improving our Service Level.

At the same time, I have some tips for you if Windows Update issues are encountered in the future.

1: Windows Update issues can be temporarily. We can try restarting the computer to test if the is the issue is solved.

2: When Windows Update issues are encountered, it’s best to try suggestions given by the website first, because these suggestions are most often found to resolve the issue.

3: If one update fails, we can try manually downloading it from Microsoft Download Center:

I also would like to share more resources. Please check the Microsoft Knowledge Base, which provides a wealth of information that you can use to troubleshoot an issue or answer a question:

Search the Support Knowledge Base:

Another good resource is Microsoft Newsgroups:

Based on the current status, I will go ahead and close the case. If you need further assistance from me, please feel free to send emails directly to with the Case ID in the subject line. This issue will then be reactivated for me to follow up with immediately. I appreciate the opportunity to be of assistance.

Your satisfaction to my overall service is my first priority.

Again, thank you for using Microsoft Online Support Service.

Have a nice day.

Best Regards,