I installed Windows Vista Ultimate on my laptop on the 17th and have been very, very happy. I'm running it on an IBM T42P (1.8Ghz Pentium M, 1GB of ram, 5400rpm disk) and it has been smooth as silk. The UI is extremely pretty and responsive, the various interface improvements are excellent, and I've encountered no bugs whatsoever... until today.
One of my favorite applications is called Notepad2. It's a free replacement for the tired old Notepad application that has come with Windows since the days of Windows 3.x. It has a lot of great features, include syntax highlighting for a wide variety of programming languages.
Notepad2's developers take the minimalist approach to almost everything. The application itself is only 540KB and it doesn't even ship with an installer. Alas, the lack of an installer exposed a bug in Vista.
After extracting Notepad2.exe into a new folder in c:\Program Files\, I attempted to run it. I was presented with the dialog to the right. It's the same dialog you get on XP SP2 when you try to run an EXE that came from another computer. Pretty standard and expected.
Obviously having that dialog popup every time I open a txt file is not exactly what I'm looking for, so I unchecked the "Always ask before opening this file" check box, figuring that would be the end of that.
Just to make sure, I closed Notepad2 and tried opening it again. Damn. The dialog is back. How annoying. Ok, this must have something to do with User Account Control (UAC). I remembered that XP had an "Unblock" button in the File Properties dialog that allowed you to get rid of this warning as well, so I opened up the dialog and clicked the "Unblock" button you see in the screen capture on the left.
I was surprised to not see any UAC confirmation dialog, but I figured that ought to do it. I clicked OK and tried opening the program again.
Guess what. The same security warning is still there. Ok, this is getting silly.
I looked around online for a few minutes to see if anybody had similar issues, but I only found a couple of unanswered forum posts that were of no help. I then tried to run explorer.exe as Administrator, only to realize that the Administrator account was disabled. This makes sense, however, as a dedicated admin account isn't (or shouldn't be) necessary in Vista thanks to UAC.
I then tried to see if I could get the properties dialog of the file to run as admin, but I couldn't figure that out either. I'm sure there is a dll I can run as admin to get this to work, but I couldn't find any documentation.
Then I realized that the reason I am unable to unblock the file is because that button modifies the file itself. When I had extracted the files into c:\Program Files\Notepad2\, Vista had prompted me via UAC to perform the action. This means that the file permissions only allowed administrators to modify the file, and since Vista was not prompting me with UAC when I clicked "Unblock", the permissions changes were silently failing. That, my friends, is a bug.
Vista should be prompting me with a UAC dialog anytime I try to do something that I don't have permission to do. With the exception of certain compatibility redirections, there should be no silent failures due to permissions.
The fix was simple once I realized what was going on. I simply edited the file permissions of Notepad2.exe to give me full control and then unblocked the file. This permissions change caused a UAC dialog to appear, just as it should have.
Admittedly, this bug won't come up a whole lot as the vast majority of programs include an installer. But I have to wonder how this bug was missed. I know for a fact that many people inside Microsoft use Notepad2. I'm fairly sure I heard about it for the first time on Channel9. The only thing I can think of is that many people inside Microsoft don't follow their own advice and end up turning off UAC.
Sigh... oh well. Vista still rocks.