'powershell' is not recognized as an internal or external command, operable program or batch file

来源:互联网 发布:卖数据的公司 编辑:程序博客网 时间:2024/06/04 18:41

Change

From:

String cmd = "cmd /c powershell -ExecutionPolicy RemoteSigned -noprofile -noninteractive " + command;


to:

String cmd = "cmd /c c:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell -ExecutionPolicy RemoteSigned -noprofile -noninteractive " + command;

0 0
原创粉丝点击