Jan 27, 2009

Windows Vista Registry Problems

I recently endured a nightmare situation in Windows Vista. After a restart all of my file extensions (including .exe!) had been disconnected from their handlers and many fundamental services were failing.

The first symptom that jumped off the desktop was the blank icons of most of the files and shortcuts on the desktop. Because the file extensions had lost their application connections, Windows could no longer locate and display the appropriate icon for many files.

Next, and far more disturbing than the shortcuts, I noticed that I couldn't double-click a shortcut to load a file. I tried running a few applications, nothing worked.

Finally, after a bit of hacking around I discovered that Windows Key + R still worked, and I could type a URL into the Run dialog to bring up a browser, e.g. Windows Key + R, type 'http://google.com', hit Enter.

Once into a browser I was able to Google around, and after trying several fixes for similar problems I located the following post, which solved the problem:

Weird Vista Registry Issue (BrianPeek.com)
In case that link disappears the relevant fix is:

  • Install subinacl.
  • Copy/paste the following to a batch file and run it, replacing YOURUSERNAME with your Windows username:

  • cd /d "%programfiles%\Windows Resource Kits\Tools"


    subinacl /subkeyreg HKEY_CURRENT_USER /grant=administrators=f /grant=system=f /grant=restricted=r /grant=YOURUSERNAME=f /grant=restricted=r /setowner=administrators
    subinacl /keyreg HKEY_CURRENT_USER /grant=administrators=f /grant=system=f /grant=restricted=r /grant=YOURUSERNAME=f /grant=restricted=r /setowner=administrators

    subinacl /subkeyreg HKEY_LOCAL_MACHINE /grant=administrators=f /grant=system=f /grant=users=r /grant=everyone=r /setowner=administrators
    subinacl /keyreg HKEY_LOCAL_MACHINE /grant=administrators=f /grant=system=f /grant=users=r /grant=everyone=r /setowner=administrators

    subinacl /subkeyreg HKEY_CLASSES_ROOT /grant=administrators=f /grant=system=f /grant=users=r /setowner=administrators
    subinacl /keyreg HKEY_CLASSES_ROOT /grant=administrators=f /grant=system=f /grant=users=r /setowner=administrators




  • Before I located the above fix, my first step toward fixing this issue was to re-associate the .exe extension with its Windows handler. Without this .exe handler hooked up your system is brought to its knees, as you can no longer run even many of the diagnostic tools you might want to use to look into what's going on. If you just want to start by fixing the .exe association, follow these steps:
  • Hold down Windows key, then press R
  • Type 'regedit' into the Run dialog and press Enter
  • Save the following file to your desktop as 'exefile.reg':
    Windows Registry Editor Version 5.00

    [HKEY_CLASSES_ROOT\.exe]
    @="exefile" "Content Type"="application/x-msdownload"

    [HKEY_CLASSES_ROOT\.exe\PersistentHandler]
    @="{098f2470-bae0-11cd-b579-08002b30bfeb}"
    (download it here if you can't save this yourself)
  • In the Registry Editor, click File->Import and choose the 'exefile.reg' you created.

    In attempting to locate the source of this issue, which was caused by missing registry permissions, I looked through my recent install history, and I believe that one of my recent installs messed up and removed all permissions from some root keys (such as HKEY_CLASSES_ROOT). I don't want to point any fingers but the last things I installed on my system as these problems started (from oldest to newest) were:

    Windows Live Writer 12.0.1370.0325
    SpamFighter 6.3.21
    Microsoft Silverlight Developer Package 2.0.30523.8
    Microsoft Silverlight 2.0.30523.8
    Update for Microsoft Windows (KB110806)
    Update for Microsoft Windows (KB929300)

    Somewhere in the sequence of installing these programs the registry permissions were broken.

  • No comments:

    Post a Comment