cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
vvurakar
Level 2

Create shortcut which launches a command prompt and go to my install directory

Hi,

I'm trying to create a shortcut which has to launch a command prompt and "cd" (go) to my install directory?

I was able to launch the command prompt by giving cmd.exe at the Target of the shortcut as follows

Target:: [SystemFolder]cmd.exe

But I want to know the arguments that should be given to this target to "cd" to my installation directory

Can someone help me with my problem!!!
Labels (1)
0 Kudos
(3) Replies
RobertDickau
Flexera Alumni

You might type cmd /? at a command prompt for ideas; the /C and /K switches to cmd.exe let you pass in a command to run...
0 Kudos
MarkEarle
Level 6

vvurakar,

cmd.exe /K "cd /d [InstallDir]".

This will leave the command prompt open and change to the proper location. Using /d in the cd command tells the OS to follow the folder.

Cheers,

ME
0 Kudos
g_noyer
Level 4

May be you can test the "Working Directory" setting of the shortcut
By this way, you will not need to do "cd folder"
0 Kudos