psexec exited with error code 1 - double quotes

醉酒当歌 提交于 2019-12-11 01:25:36

问题


Why does the psexec-executed command below fail when I add double quotes to the parameter?

  • It works fine without psexec with double quotes
  • It works fine with psexec without double quotes!

The contents of the .bat file are as follows:

set FILEPATH=%~1
set BAT_ARCHIVE_IDENTIFIER=%~2
set DEPLOYMENT_ROOT=%~3
echo %FILEPATH% %BAT_ARCHIVE_IDENTIFIER% %DEPLOYMENT_ROOT%

回答1:


psexec -u user -p pass cmd /c "d:\GitRepos\runAll.bat a1 a2 "a3""


来源:https://stackoverflow.com/questions/24905546/psexec-exited-with-error-code-1-double-quotes

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!