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!

Launch DOS app & wait for return status 1

Status
Not open for further replies.

Dinobrago

Technical User
Dec 8, 2001
184
US
I am writing a VB app that constructs a command string which then needs to be launched in DOS and wait for the returned status. The equivalent in VB Script is to create a WSH and Run the command ie:

Dim cmdString
cmdString = "App.exe -flag1 inputArg"
Set objShell = CreateObject("WScript.Shell")
rval = objShell.Run(cmdString, 0, True)

I need to recreate this in a VB application. Any ideas?

Dino
 
I like your first answer better than the second, jonscott8. I thought of the second and it looked messy to explain or to implement - but I didn't even think of the first one.

You get a star!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top