Open Powershell in a specific directory from shortcut

后端 未结 9 1287
再見小時候
再見小時候 2021-01-30 12:22

This sounds like it should be so simple... I must be dumb.

All I want is to make a windows short-cut that opens Powershell into a specific directory:

I\'m using

9条回答
  •  后悔当初
    2021-01-30 12:48

    Ok - you need to use the & parameter to specify it's a powershell comand & the syntax is slightly different:

    %SystemRoot%\system32\WindowsPowerShell\v1.0\powershell.exe 
    -noexit -command "& {cd c:\path\to\open}"
    

提交回复
热议问题