PS Studio调用.exe输出错误信息的解决办法

在一个button_click下调用了如下外部可执行文件:

1 $button1_Click = {
2     #TODO: Place custom script here
3      .\PsExec.exe  \\192.168.10.2 -u testp\administrator -p cmr.123 cmd /c iisreset
4                  }        

 

在打包exe格式的时候,如果选择platform为“Windows”,则在单击 button1后,会出现如下错误提示窗口:

 

在PS Studio的 Output中也会有错误输出:

 

但实际上 “.\PsExec.exe  \\192.168.10.2 -u testp\administrator -p cmr.123 cmd /c iisreset” 在PS中运行是没有任何问题的。

 

目前解决方法:

在打包exe格式的时候,选择platform为“Windows Form”后,不会再出现该错误提示。

 

posted on 2014-08-20 23:02  momingliu11  阅读(245)  评论(0编辑  收藏  举报