Reputation: 53
I have a batch file called test.bat in server which contains 2 call batch command inside it.
I am running this test.bat from another server using psexec command
The first call batch file command working fine however when it goes to next call batch command its throwing error ".bat exited with error code 0."
Actually what the second command does is that something like below
call D:\abc\def\ghi\test2.bat test >>test.log
I am not sure why its failing in this line. Is it due to write permission?
Please advise...
Upvotes: 0
Views: 8437
Reputation: 53
Finally I resolved by the below command and write the log in my local server where I am running the psexec command
psexec -u username -p password \\testserver "c:\test\test.bat" 1>Outputlog
Upvotes: 0
Reputation: 1000
Error code 0 actually means success. This is psexec reporting that the remote execution completed successfully.
Upvotes: 2