Reputation: 3
After editing the batch file I want to run it. When I run it from the desktop, it runs properly, but from my program, I get the error:
invalid procedure call or argument
The batch file is in use until the VB6 program ends.
dRetVal = Shell("C:\Users\Theo\Desktop\BatchName.bat", vbMinimizedNoFocus)
What is wrong with this line? Or do you have other suggestions? Thanks!
Upvotes: 0
Views: 881
Reputation:
Batch files are run by C:\Windows\System32\CMD.EXE
. CMD
requires switches /c
to run and exit and /k
to keep running after the batch finishes. See cmd /?
Upvotes: 1