psexec exited with error code 1 - double quotes

2019-07-20 17:21发布

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!

enter image description here

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条回答
戒情不戒烟
2楼-- · 2019-07-20 17:29
psexec -u user -p pass cmd /c "d:\GitRepos\runAll.bat a1 a2 "a3""
查看更多
登录 后发表回答