psexec无法运行.vbs本地或unc

我试图通过psexec远程运行.vbscript。 即使像-u -p -s -c这样的开关,我也会遇到错误。 这是我试过的:

1.)

 psexec -u user@domain -p password -s \\computer "\\uncpath\file.vbs" "access denied" 

我已经看到,要解决这个问题,你可以添加registry主机和重新启动。 这不是我的select。

接下来我尝试了localpath的复制开关。

2.)

 psexec -u user@domain -p password -s \\computer -c "C:\localpath\file.vbs" "The system cannot find the file specified" 

那么如何通过psexec运行.vbs脚本?

好的,我明白了。

  • 必须拿出 – 切换。 使用的cscript
  • 使用了cscript / nologo开关。

    psexec -u user @ domain -p password \\ computer cscript / nologo“\ uncpath \ file.vbs”