Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

This question already has an answer here:

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?

share|improve this question

marked as duplicate by Karan, KronoS, TFM, HackToHell, Hennes Mar 10 '13 at 14:29

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

    
What do u mean by "right effect"? –  Nikhar Mar 9 '13 at 4:56
    
@Nikhar I mean, the Command Window still opens in c:\windows\system32 –  AngryHacker Mar 9 '13 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 '13 at 4:58
add comment

1 Answer

up vote 4 down vote accepted

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.

share|improve this answer
    
Perfect, that's exactly what I was looking for. –  AngryHacker Mar 9 '13 at 5:48
add comment

Not the answer you're looking for? Browse other questions tagged or ask your own question.