Eri*_*rik 5 powershell runonce windows-7
我有一个看起来像这样的powershell.exe,它可以从我的命令行运行:
powershell.exe -noexit -command " & 'C:\Test\test.ps1' "
Run Code Online (Sandbox Code Playgroud)
但是,当我在当前用户的runonce-key中完全按照那种方式输入该条目时,没有任何反应.
从runonce调用powershell.exe传递参数或运行的正确方法是什么?
尝试使用完整路径:
c:\WINDOWS\system32\WindowsPowerShell\v1.0\powershell.exe -noexit "C:\Test\test.ps1"
Run Code Online (Sandbox Code Playgroud)
要么
c:\WINDOWS\system32\WindowsPowerShell\v1.0\powershell.exe -noexit -command " & 'C:\Test\test.ps1' "
Run Code Online (Sandbox Code Playgroud)