Weekend Woes: The price I paid for tinkering...

I woke up Saturday morning to a Windows Vista machine that seemed to be crippled beyond hope, from what looked like a licensing issue. But wait, Aero was working and Microsoft announced "reduced functionality mode" was no longer in Service Pack 1... so what the hell happened?

Translation: Excuse me, WTF R U DOIN?

I opened up the Services applet and noticed the Software Licensing service was stopped. The Software Licensing service "enables the download, installation and enforcement of digital licenses for Windows and Windows applications. If the service is disabled, the operating system and licensed applications may run in a reduced function mode". I attempt to restart the service but received yet another scary error message:

Translation: Hahahahahahahahahahahahahahahahahahaha.

0xC004F029 was not amongst the HRESULT error codes I have memorized so I grep'ed the Windows Vista SDK include folder and found a hit in slerror.h. According to the header's comments, SL_E_INVALID_RUNNING_MODE is returned when "the Software Licensing Service cannot be started in the current OS mode".

Sorry, but grep is 9013284 times faster than Windows Search. Yes, even the 4.0 preview.

Not aware there were different "OS modes", I went on a disassembly spree of various copies of slsvc.exe, time spanning across the entire weekend. It wasn't until after receiving a checked/debug copy of slsvc.exe, from a friend, that I discovered the Software Licensing Service does not support running in MiniNT (Windows PE) mode. My head introduced itself to the wall several times at this point.

It's all Long Zheng's fault. (Yes, really)

Last week, he posted an article on creating a recovery disc using a copy of recdisc.exe from beta Service Pack 1 images. Not satisfied with his solution, I started tinkering with the final Service Pack 1 copy of the executable, which eventually led me into researching why it was checking for the existence of the MiniNT registry key under HKLMSYSTEMCCSControl. So I created this key.

Well, I forgot to clean this up (oops) and a reboot later: half my OS thought I was in MiniNT mode. Apparently this is the preferred way to check what mode the operating system is in. Go figure. Deleting this key and rebooting resolved all my problems in one swoop.

What was noticeably broken/disabled:

  • KnownDlls/KnownDlls32 sections (completely missing, very very bad)
  • Various applets (control panel, display properties, everything useful)
  • Pagefile was disabled (temppf.sys kicked in)
  • Audio services (leaking unclosed handles to what it thought were KnownDlls)
  • Software licensing components

What survived:

  • Basics (networking, colors, mouse input, etc.)
  • Aero Glass and other premium applications
  • Annoying people on Windows Live Messenger

Yet another one chalked up to experience. Know anyone that provides hair restore services?