如何在runonce-Key中运行powershell脚本?
发布时间:2020-12-13 22:38:56 所属栏目:Windows 来源:网络整理
导读:我有一个看起来像这样的power shell.exe,它可以从我的命令行运行: powershell.exe -noexit -command " 'C:Testtest.ps1' " 但是,当我在当前用户的runonce-key中完全按照那种方式输入该条目时,没有任何反应. 从runonce调用powershell.exe传递参数或运行的
我有一个看起来像这样的power
shell.exe,它可以从我的命令行运行:
powershell.exe -noexit -command " & 'C:Testtest.ps1' " 但是,当我在当前用户的runonce-key中完全按照那种方式输入该条目时,没有任何反应. 从runonce调用powershell.exe传递参数或运行的正确方法是什么? 解决方法
尝试使用完整路径:
c:WINDOWSsystem32WindowsPowerShellv1.0powershell.exe -noexit "C:Testtest.ps1" 要么 c:WINDOWSsystem32WindowsPowerShellv1.0powershell.exe -noexit -command " & 'C:Testtest.ps1' " (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |
相关内容
- 在Windows故障转移群集中触发故障转移?
- windows – 打开WDK Projects会导致出现“发生一个或多个错
- windows – SAPI:Speech to Text示例
- 访问PowerShell脚本中的Windows任务凭据
- windows – Inno Setup在静默安装期间将锁定文件替换为下次
- windows-server-2003 – 如何连接到特定的域控制器?
- windows-xp – 如何锁定Windows XP以用作互联网信息亭?
- Win10专业工作站版本怎么样?四大新功能强大到没朋友。
- windows-server-2008 – Windows 2008终端服务“Easy Print
- windows-phone-7 – WP7音频/视频文件选择器