Archive for March, 2010

Setting command prompt start directory for administrator in windows (7)

I bought a new computer, pretty cheap, pretty good. So I’m pretty happy with it. Its one weak point is that its 3D graphics card (which I do need) has no decent driver support under linux yet. So a good reason to leave windows 7 on it for a while, and find out how it works. I do miss linux, but I have no major complaints so far.
Something I brought over from linux, is wanting to use the command line, and I really needed it for playing around with Django. I guess the command line in windows is not really the same as in linux, and it doesn’t work as smoothly, but there is one. What I do hate, however, is typing in directory paths using the – for my finger less conveniently placed – “\”. So I wanted to start the command prompt in my Django directory. If you create a shortcut to the command prompt, you can set a directory where it has to start. If you run it as administrator, however, it still starts up in the system folder. Windows wouldn’t be Windows however, if there wasn’t a registry setting for this:
(start the registry editor with regedit in the start menu)
add to HKEY_CURRENT_USER\Software\Microsoft\Command Processor a new string value “Autorun” (if it’s not there yet) and set its value to “CD /d ” (E.g. CD /d C:\Users\User\Desktop)
And that works when you open cmd as administrator too…
(BEWARE, messing with windows registry can cripple your windows installation, so be careful and backup)