Workaround for Vista stupidity

1 July 2008

When I run certain command-line tools from a command prompt in Windows Vista, it displays the results in a separate window. This separate window disappears when the tool exits. This is the most mind-bogglingly stupid behaviour I have encountered so far in an operating system famed for its mind-boggling stupidity. However, there is a workaround – you need to start a shell as the Administrator user (not just as an Administrator).

Here’s some more detail:

  • If you are not the Administrator user (even if you are a member of the Administrators group) then when you run a command-line tool that requires admin privileges, you need to click on one of Vista’s never-ending stream of “this program wants access to your computer” messages. This is pretty sensible, annoying though it can be.
  • It then opens a new command-line window in which you can interact with the program. I can see no value in this whatsoever; the window is not highlighted in any way, so it’s not to make it clear to you that this is a potentially dangerous program. Potential reasons welcome in the comments.
  • The real stupidity, however, shows itself when the program exits. Because then the window closes – taking with it all of the information the tool displayed for you. foo /help suddenly becomes totally useless. Error messages? Forget about them.
  • And to make it worse, if you try to redirect the standard output or error of the program to a file or to more or anything else, you get nothing – it still goes into the disappearing window.

After spending quite literally hours trying to debug a problem with the Python easy_install script, which was quite sensibly logging the details of the problem into a window that Vista promptly closed, I discovered a workaround:

H:\>runas /user:Administrator cmd
Enter the password for Administrator:
Attempting to start cmd as user "DRX\Administrator" ...

H:\>

And up comes a new command prompt. Anything you run in there will put the standard output and error into the command line it was started from, just as any sane user would have expected in the first place.

4 thoughts on “Workaround for Vista stupidity

  1. Dan Homerick

    Thanks — this proved to be useful when I hit the same problem. Incidentally, a more GUI-ish way of accomplishing the same is to do a search for cmd, right-click on the result and choose “Run as administrator”

    I needed to do it that way, since I don’t even know what the admin password is — it’s set to not require a password when I elevate.

  2. Steve Rowley

    Giles – bless you; I had the same problem. Props also to Dan, since I too have no idea what the administrator password is on my rig. None of the greatness that is about to happen on my computer would be possible without the two of you.

  3. Catherine Devlin

    THANK YOU THANK YOU THANK YOU! I’d gone literally months without using Python on my Vista machine b/c I couldn’t read easy_install feedback. It was infuriating! Thanks to Dan, too, since I also don’t have the Administrator password.

Comments are closed.