I'm afraid I'm not very good at using dllcall! I've been using this to run “setup.exe” with admin privileges, and it works fine:
DllCall("shell32\ShellExecuteA", uint, 0, str, "RunAs", str, A_ScriptDir "\SETUP.exe", str, PARAMS , str, A_WorkingDir, int, 1)
This is quite similar to the “run” command, but I'd like to be able to replicate “runwait”. So I'd like to find out the Process ID of the setup.exe that's just been run with this command, and then just use:
. … but I don't know how to get the PID from ShellExecuteEx. I've looked at using ShellExecuteExA, because that looks like it might be able to return the PID, but I don't understand what's on MSDN, or how to turn this into a dllcall.
Please help me!