Friday, August 24, 2007

Command Prompts on Vista

I learnt of a neat trick on Vista through another blog - if you hold down shift whilst right clicking on a folder on Vista you get an extra entry: "Open Command Window Here" (in general you get some extra entries, folder or file). Very useful - previously on XP I had to install a PowerToy (as I remember?) to get this in the context menu.

It does lead me in to a bit of a rant though. When you have UAC enabled, sometimes you need to use elevated command prompts which start in a particular directory. This was the case for myself one day, I wanted a reusable shortcut for this so I created a new shortcut to cmd.exe and changed the "Start In" directory. Opening it showed the expected behaviour - it started in the chosen folder. Now to run it as administrator (using the context menu option). Failure - it starts in "C:\Windows\system32" for some reason. Possibly because it's the location of consent.exe, I don't know, but it's not the most intuitive behaviour.

No comments: