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

Batch file

Status
Not open for further replies.

selimsl

Programmer
Aug 15, 2005
62
TR
Hi

I have a batch file (compile.bat).It works correctly.
But I want to run this bat file using VB.

cmd = Shell(App.Path & "\C51\BIN\compile.bat")

I tried the code you can see above, it can run the batch file,but the batch file doesnt work correctly.
When I double click on batch file it works correctly
but when I using vb It doesnt work correctly
 
Dim lngCMD As Long
lngCMD = Shell(App.Path & "\C51\BIN\compile.bat")

- Or -

Shell App.Path & "\C51\BIN\compile.bat"

- Or -

Call Shell(App.Path & "\C51\BIN\compile.bat")
 
Is it possible that in order for this batch file to run, you need to have that the active directory?

You might want to edit the batch to CD (Change Directory) before it does it's thing.

Just guessing...

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top