3

I've pinned a Command Prompt to the taskbar. I set it to open in Administrator mode. When I click on it, it opens in c:\windows\system32.

I'd like it to start in c:\code. To that end, I right-clicked on the pinned icon, selected properties and changed the value in the Start in textbox to c:\code directory. However, it's not having the right effect.

So how can I get a pinned Command Prompt window to open in a certain directory?

3
  • What do u mean by "right effect"?
    – Nikhar
    Mar 9, 2013 at 4:56
  • @Nikhar I mean, the Command Window still opens in c:\windows\system32 Mar 9, 2013 at 4:56
  • Just create a shortcut on the desktop, change the "Start in" entry to to "c:\code" of that shortcut and it will open in that..
    – Nikhar
    Mar 9, 2013 at 4:58

1 Answer 1

7

When you edit the Properties of the pinned Command Prompt, instead of changing the "Start In" value, add the following to the "Target" value:

/K cd C:\code

So that your target should look something like:

%windir%\system32\cmd.exe /K cd C:\code

You can also Shift+Right-Click in any open Explorer window and click "Open Command Window Here" to open a Command Prompt from any open folder, if you didn't know.

1
  • Perfect, that's exactly what I was looking for. Mar 9, 2013 at 5:48

Not the answer you're looking for? Browse other questions tagged .