Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

sending an error code from an app to a batch-file

Status
Not open for further replies.

TonyVBnet

Programmer
Mar 31, 2004
17
DE
i've got two apps. the second one can only start, when the first was successfull. so i want to send an error code from the first app to a batch-file, which helps to start the second app. so in the batchfile i've got an if-statement to check if the code is 0 or not. if it isn't the second app won't start.
but i actually don't know how to send this error code from vb.net to this file! has anybody got an idea? or some code?
*sorry for my bad english :)*
thx
tony
 
Tony

Isnt it possible to chain the 2 events together in one VB.NET project?

Another solution may be to write a control file if the first routine runs successfully. Remember to delete the file when you first start program 1, and create it only if the routine completes successfully.

Then your batch file could use an IF EXISTS clause to check for the control file before it starts program 2.



Sweep
...if it works dont mess with it
 
thx
i'll try this.
unfortunately the programs start about the windows scheduler. so i think its not possible to make one project. also, they should be independent from each other.
but i think your solution is a good one.
bye
tony
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top