Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Force Windows Batch Script Return Code 0

A vendor has provided us with a Windows Batch script that needs to have a return code of 0.

Per that vendor, there are safe to ignore messages being printed by the script.

The scripts are used for quiescing the application for a proper backup. Our backup software requires a return code of 0.

How can I do this?

like image 616
andyhky Avatar asked Jan 18 '11 16:01

andyhky


1 Answers

End the script with:

exit /b 0 
like image 98
user1686 Avatar answered Sep 22 '22 11:09

user1686