From wxWidgets application I try to run installer, made with NSIS, in silent mode (/S flag). Got this error:
Execution of command: "C:\somecommand.exe" failed (error 0: Операция завершена успешно / Successful).
When I run installer silently from command line, I got UAC popup, but when I execute it from wxWidget application I got only this error. And what this error means? Like "Fatal Error: All is fine".
In NSIS script I have RequestExecutionLevel admin, because I really need it to have ability to install program in directories like Program Files.
To start a Windows application that requires elevation you must use ShellExecute and not CreateProcess, CreateProcess will just fail with a elevation required error.
I would imagine that
wxLaunchDefaultApplication
usesShellExecute
internally but it seems a bit risky to rely on that so you might as well use a ifdef: