Jenkins windows XCOPY command prompt execute batch cmd 'XCOPY' is not an internal or external command, operable program or batch file.

Because Jenkins is not configured environment variables cause 

Open = Jenkins " the Manage Jenkins  =" the Configure System => Global Properties

 

 

 

New global variables

Health: Path 

值: %SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\;C:\Program Files\Microsoft SQL Server\110\DTS\Binn\;C:\Program Files (x86)\Microsoft SQL Server\110\Tools\Binn\;C:\Program Files\Microsoft SQL Server\110\Tools\Binn\;C:\Program Files (x86)\Microsoft SQL Server\110\Tools\Binn\ManagementStudio\;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\PrivateAssemblies\;C:\Program Files (x86)\Microsoft SQL Server\110\DTS\Binn\;C:\Program Files\dotnet\;C:\Program Files\Git\cmd;C:\Program Files\nodejs\;C:\Windows\System32\

Because xcopy.exe in C: \ Windows \ System32 \ under, so the environment variables to the C: \ Windows \ System32 \ path to the other issues the same token, the introduction of the corresponding path can be.

 

Guess you like

Origin www.cnblogs.com/wsprince/p/11497685.html