If you’re a system administrator (or like many developers), chances are you use PowerShell a lot and have the PowerShell console or PowerShell ISE on your Windows 7 taskbar. On Windows Vista and on Windows Server 2008 prior to R2 I was annoyed by having both ISE and console on the quick launch bar or pinned to the start menu.

In Windows 7 here’s a neat tip. Pin the PowerShell console to the taskbar and not the PowerShell ISE. When you right click on the icon, you get a handy jump list which includes not only "Run As Administrator" but also "Open PowerShell ISE". All in the space of a single tile.

Windows PowerShell Jump List

imageI love the new per-application MRU list that appears when you right click a pinned taskbar item. As I mentioned in a previous post, this seems to be driven off the existing API’s that the shell and applications use to populate the “Recent Documents” list in previous versions of Windows.

One annoying thing I noticed was that Visual Studio solutions were never showing up in the MRU list for Visual Studio. In fact, nothing was. It took about 5 seconds before I realized “duh… solutions aren’t associated with Visual Studio”. They’re actually associated with a stub called “Visual Studio Version Selector” which looks inside the .sln file and launches the appropriate version of Visual Studio if it is installed on your machine.

Personally, one version of Visual Studio is big enough for me so I always run the latest (currently Visual Studio 2008). I don’t need this version selector. Right Click –> Open With just screwed up the icons and didn’t help the MRU list problem but there was a very simply registry fix to make .sln files associate with Visual Studio 2008.

Windows Registry Editor Version 5.00 
[HKEY_CLASSES_ROOT\VisualStudio.Launcher.sln\Shell\Open\Command]
@="\"C:\\Program Files (x86)\\Microsoft Visual Studio 9.0\\Common7\\IDE\\devenv.exe\" \"%1\""

Put the above in a .reg file or go into regedit.exe and do it by hand. If you need more instructions then the hack probably isn’t for you. Note that this will eliminate the ability to double click a .sln file and have it open in the version of Visual Studio that created it. But who really does that anyway.

Here’s a little tip for the security conscious. Over time, you will undoubtedly connect to various networks a couple of times or maybe even just once. But if you’re like me, you probably habitually check (or fail to uncheck) the box that saves the wireless network connection settings.

This can be an accident waiting to happen because let’s say you were living in a hotel for a week like I was while waiting for settlement on a new house. I had connected to an encryption-free wireless network called "lodgenet" which was how this particular hotel’s wireless was set up. Since there was no key, it wouldn’t be difficult for a hacker on a train to set up a fake access point called "lodgenet" and once I’m connected, well then it’s anyone’s guess what would happen next.

But where it’s particularly troublesome is when you connect to an open network called "linksys" or something that an out-of-the-box, unsecured access point defaults to. There’s so many of these that you may find your tablet, iPhone, or what not connecting to all kinds of unscrupulous networks. Hacking issues aside, some people have been *sued* over this crap believe it or not.

Anyway, from time to time, you should go into Network and Sharing Center, click Manage Wireless Networks link on the left, and delete any that you don’t want to automatically connect to.

wireless1  wireless2

Warning – This story does not have a happy ending so don’t read this whole thing if you’re looking for a heartwarming story or a solution to your corrupt Vista installation. I’m just writing this lengthy post so that search engines will index it effectively so that others with similar problems have some type of comfort and don’t waste too much time.

I shouldn’t be going into this much detail here because I am extremely busy reinstalling all my apps AGAIN. You see, in the last 7 days or so, I have had to format and reinstall Vista RC1 3 times. Unfortunately, it wasn’t as easy as installing, finding out it didn’t work, then installing again. No this really sucked. Here’s what happened.

First, on my Tablet PC

As I may have mentioned before, I recently bought a Gateway CX2724 Convertible Notebook (fancy word for Tablet PC without the all the negative press). This was before Vista RC1 so I didn’t bother installing the current CTP because I knew RC1 was right around the corner. I figured I’d set up all my apps and then do an upgrade install. Oh if only I was so lucky. Unfortunately the upgrade option was disabled. Vista didn’t tell me WHY… but I was trying to upgrade XP Tablet to Vista Ultimate which is supposedly supported. I bit the bullet and did the full install. A full install and setup of all my apps is a multi-day process for me. Not exactly a good argument in my anti-Web 2.0 war, but it is what it is.

Next, on my desktop

This was on a different machine so it doesn’t exactly represent a failed install from the previous attempt, but I still consider the previous attempt unnecessary work since I should have been able to do an upgrade.

Anyhow, I did a fresh install on my desktop and everything was working great. I installed all my apps which as I said is a multi-day process. Once this was done, I happily used Vista for a day or two with no issues. Did something that required a reboot, but I don’t remember what it was. I might have just done it for the hell of it, I forget. But the point is, it was nothing serious. The Vista boot screen came up, then a black “desktop” with the Vista build number in the lower right hand corner and a mouse cursor in the center of the screen…. and nothing else. Left this overnight figuring something would “time out” and Vista would be back to the desktop. The next morning, it was in the same state. Several reboots resulted in the same, occasionally one would produce a BSOD for Win32k.sys. Oh boy, I’m screwed. Safe mode, VGA mode, last known good, etc. Nothing fixed it. Tried every system recovery option from the installation cd too.

Tried system restore (had to do this from the installation cd since I couldn’t boot) and after trying several restore points, I finally found one that worked but it was the one right before one of the first apps I installed – SnagIt. Wow what a waste because this returned my system into pretty much a freshly installed state. I figured at this point since I had system restored back so far, it was worth just formatting and reinstalling anyway. So that’s what I did.

Desktop Attempt #2

I assumed the problem before was caused by the SnagIt Virtual Printer since that’s the only “systemey” type thing that SnagIt does that could conceivably cause the system to fail to boot properly. So I figured I would install this last. That way, if it caused the problem again, I could restore to right before it and not undo all my hard work installing everything else. So that’s what I did. After another 2 days of installing and setting up, I took the plunge and installed SnagIt. However, I realized I installed the wrong version so I uninstalled it and installed the correct version. This is the only “weird” thing that occurred. Rebooted and sure enough, got the same black screen. Good! I had reproduced the error. Time to undo it with system restore. Success! I was back into Windows.

So I reinstalled SnagIt this time without the printer driver and rebooted to make sure everything was good and everything was fine. Now, I can’t say 100% that the printer driver was the problem because the other difference is that I did one install this time, not an install-uninstall-install sequence.

So everything is going good, Office Beta 2 Tech Refresh is released, and all my apps are installed including SnagIt which is working fine. This is the point where I should have listened to Vista and did a full system backup! Of course I didn’t have an external drive and I didn’t really feel like feeding it 20 DVD’s so I put it off.

I saw an ad for a Wacom Graphire Tablet on Best Buy’s web site and drove over to buy it. Came home, plugged it in, found that it worked like a mouse, but not like a Tablet PC. Went and got the HID drivers from Wacom’s site and installed. Had to reboot. You already know what comes next. The alternating BSOD and no logon screen issue. Ugh. Get out the Vista install CD and go to System Restore. I try to restore to before the point where I installed the Wacom tablet and after the “finalizing system restore” message I get an error that System Restore didn’t complete because of an unspecified error. OH NO. This is bad because I know from my past experience that system restore was the ONLY thing that got me up and running.

Having now spent over 6 days between my tablet, and the two installs on my desktop, I was determined not to let this install go to shit. I started to do some heavy duty stuff. I’m gonna type it all out in detail so that hopefully it gets indexed well on Google for the next poor sucker this happens to:

  • First I tried to RDP. Hm that’s interesting. RDP isn’t answering at all.
  • I opened my Tablet PC which was working fine and opened the Computer Management console and connected to the desktop. Even though there was no logon screen and it appeared to be hung at boot, all of the system services appeared to be up and running. I didn’t make a list unfortunately, but nothing screamed out at me. (I would later find out that terminal services was not running.)
  • I connected to the file shares to make sure my data was safe (it was).
  • I turned on remote registry and opened up the registry from the tablet. I did a quick eyeball scan of the run keys and the service keys to make sure nothing looked out of wack on the desktop. It looked fine. Also checked in the winlogon key and the LSA key. Everything matched up.

I got the stupid idea that maybe if I removed the password on my one-and-only user account on the desktop, Vista would just bypass the login screen anyway and just log me right in. This was the dumbest thing that I did because when I did this, I kicked in a policy that users without passwords can’t do network logins. So now I couldn’t use computer management remotely, or regedit, or file shares, or anything. Totally totally stupid.

What I did was boot back to the installation media’s recovery console. In Vista, when you boot to the installation media, it actually loads a slimmed down Windows Vista. So it has regedit and a command prompt. The problem with regedit though is that it is editing the mini Vista’s registry, not your installed Vista. So I had to use the Load Hive feature to load up the HKLM sections of the registry that I was interested in. Did some more checking and found nothing obvious that I could fix.

I used the recovery console to rename the Wacom drivers and my graphics drivers (ATI Radeon) because I had noticed in the Vista newsgroups that others were experiencing this and most of them seemed to have Radeon-based video cards. Nothing worked at all. I spent about 8 hours (and 3 Stacker 2′s with Ephedra) trying to get it up and running.

So then in a last ditch effort which I knew was almost certain to screw things up beyond repair, I installed Vista on another partition to have a working installation to access the registry and file system and I would use its drivers in the old installation’s driver directory. While I was booted into the new installation I looked at the event log on the old system (did you know you can do this? Just browse to %SystemRoot%\Windows\system32\winevt\Logs and double click the event log files) to see if I could see anything suspicious.

Well I saw the problem. An event log from source LSM that said something along the lines of “Terminal Services failed to start due to a catastrophic error.” No additional information, no other logs. This explains why RDP wasn’t working earlier when all the other network services were. I’m not sure why terminal services would prevent the logon screen from happening. To experiment, I disabled Terminal Services on the working Vista install and rebooted. No problems with the login screen. Weird. I compared the terminal services registry keys on both the working and non working installations and although I spotted several differences, it was pointless anyway because I couldn’t make changes to the keys, even though they were on a non-active system and I tried to take ownership of the keys. At this point I knew all hope was lost.

So now I’m at it again

Were you expecting a happy ending? No, I gave up and reinstalled Vista again. “But WHY?” you may ask. “Haven’t you taken enough punishment?? Just go back to XP!” Nah I can’t. There’s nothing really revolutionary about Vista. I mean it’s not supposed to be. It’s an operating system. But I’ve gotten used to it and I really like it. And when it’s working, it works really really well. And I should mention that I’ve had no problems on my Tablet PC.

However, I accept and understand that Vista is still highly unstable. Don’t write me saying “I haven’t had a problem, it’s very stable for me.” Being unstable doesn’t necessarily mean it’s guaranteed to cause you problems. But it’s very fragile apparently. And when a problem does occur, it’s nearly impossible to recover from. Vista is like a big St. Bernard. It’ll go for a real long time being happy and licking your face, but if you put a little antifreeze in its bowl, it’s just gonna drop dead. What the fuck? I must be really tired. Who the hell is even reading this far down?

Lessons learned

Needless to say, I went back to Best Buy and returned the Wacom tablet. I’m sure it’s a great device but it doesn’t work right with Vista and I am not interested in waiting around for it to work. I exchanged it for an external hard drive and now I am doing the whole god damned process all over again.

But this time, I am doing a full computer backup after every major install. I’m rebooting after every product that I install. And I’m making sure system restore is catalogging every step of the way. Once I get my system to a “final” state with all my apps and settings the way I like it, I will do another full computer and document backup. I will do incremental backups of my files every day and every week I will back up my system. I promise.

I really hope you’re not here because you’re experiencing this. If so, I really feel for you and get that gun out of your mouth. It’ll be ok.