When I execute the below code, I get an error message saying "'shutdown' is not recognized as an internal or external command, operable program or batch file"
these are the standard api's if you want to shutdown the system. calling only shutdown /s wont work correctly, neither you will get any return value if the system shutdown fails.