Order of command line arguments matter when it comes to /runelevated and /w
Just a quick note that the order for command line arguments matter when it comes to /runelevated and /w (wait for process to terminate). In my case I had the following:
createprocess.exe /v /runelevated /w signtool.exe sign /v /debug /fd SHA256 /tr "http://timestamp.acs.microsoft.com" /td SHA256 /dlib C:\Users\build\Microsoft.Trusted.Signing.Client.1.0.53\bin\x64\Azure.CodeSigning.Dlib.dll /dmdf metadata.json uninstaller.exe
and found that whilst the child createprocess.exe waited for the signtool.exe to terminate, the parent createprocess.exe terminated immediately and the children continued on. I was of course expecting /w to make the parent process wait as well. The answer is to swap the command line argument order:
createprocess.exe /v /w /runelevated signtool.exe sign /v /debug /fd SHA256 /tr "http://timestamp.acs.microsoft.com" /td SHA256 /dlib C:\Users\build\Microsoft.Trusted.Signing.Client.1.0.53\bin\x64\Azure.CodeSigning.Dlib.dll /dmdf metadata.json uninstaller.exe
Perhaps the README.md or the DumpSyntax() output could make this clearer? Thanks for such an amazing tool.