Jump to content

how to retrieve .bat error code


 Share

Recommended Posts

Hi guys,

I'm using ShellExecuteWait to run my installers.

There is 2 bat files in the list of installation. 1 is to install NetFX35 and another is to setup some other stuff.

When i run the netfx35.bat, it logs as exit code 0. But the script that runs has some other error number.

Is there anyway to retrieve the exit code from the command ran?

For the other installer programs, i get the correct exit code. But when i run bat files, the exit code 0 actually refers to whether the bat was executed successfully and that's it. It doesn't return the exit code of the program ran in the bat file. 

Anyone can shed some light?

Link to comment
Share on other sites

After playing around with the codes and finding out a bit more, I was able to shellexecute the line i need from the bat script.

I realized there was too much irrelevant scripting in that bat file (which i've already done in my program)

So now, there is no need for bat files XD

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...