gtkshowwin32: Consider switching to IShellDispatch2::ShellExecute
When launching subprocesses, usually we want to inherit environment variables, file descriptors / HANDLEs, priority, etc. But when activating other apps we don't want that. Ideally, the system should take care of launching the apps (either the shell or a dedicated service) so that the environment is not mixed with that of the client.
There are a few ways to do that:
- Use IShellDispatch2::ShellExecute. This method asks the shell (explorer.exe, usually) to activate an app. Bonus point: if the client app is running elevated, the launched app runs with standard rights.
- Use the RunAs service by calling CreateProcessWithLogonW.
- An eventual GNOME / FreeDesktop.org service? :)
Note that when activating a Windows Store app (packaged app?) the app is always activated by the system, it's not a subprocess of the client
See also https://wiki.gnome.org/HowDoI/DBusApplicationLaunching