TheoDeed
TheoDeed

Reputation: 3

Shell function error "invalid procedure call or argument"

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

Answers (1)

user6017774
user6017774

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

Related Questions