New
#11
I finally had some time to investigate, and I found the problem. The thing is VBS files are not executables but documents.
You need to use the command "WScript.exe E:\MKLink.vbs"
If the command is just "MKLink.vbs", then I execute it using the ShellExecute API, which understands how to launch documents like VBS files, or TXT files, etc. However it is a fire and forget type API.
For more complex commands that use %3, %4 or %5, I need to have a direct access to the process that runs, so I can wait for it to finish. For that I need to use the API CreateProcess, which is not smart enough to know that for VBS files it needs to run WScript.exe.