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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How return a code from an exe file? 1

Status
Not open for further replies.

Bitaoo

Programmer
Dec 18, 2002
81
US
Hello,

I don't know how can I set a code to be returned by my exe program. I have a VB program that runs another VB program in this way:

Set oShell = CreateObject("WSCript.shell")
nRet = oShell.Run("Test1.exe", , True)
Set oShell = Nothing

I want to check nRet but I don't know how can I return it by Test1.exe.
For example if Test1.exe fails I want to return -1. In this way nRet will
be set to -1

I appreciate your help.

--Bita
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top