Just found out today that the ProgramID() returned for RunProgram() is not the correct process ID ("PID") for UWP apps, like the Win 10 Calculator. It works correctly for standard Win32 apps, though.
Code: Select all
Debug ProgramID(run) ; Doesn't match PID from Task Manager.
I did some research and the reason for this is that UWP apps are launched by ApplicationFrameHost.exe (AFH), and that's the PID that ProgramID() is getting. I guess this is not technically
wrong, but since Calculator's PID doesn't match Task Manager, then it's probably not the right result to return? Ideally, ProgramID() should match Task Manager, no matter whether the run program was UWP or Win32 type.