从快捷方式打开特定目录中的 Powershell [英] Open Powershell in a specific directory from shortcut

查看:65
本文介绍了从快捷方式打开特定目录中的 Powershell的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这听起来应该很简单……我一定是傻了.

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

我想要的只是制作一个将 Powershell 打开到特定目录的 Windows 快捷方式:

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

我正在使用目标:

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

Put 它只是将命令作为文本输出.

Put it just spits out the command as text.

推荐答案

使用此命令.

powershell.exe -noexit -command "cd c:\temp"

-NoExit:运行启动命令后不退出.

-NoExit: Do not exit after running startup commands.

这篇关于从快捷方式打开特定目录中的 Powershell的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆