Based on How to run exe with/without elevated privileges from PowerShell, this seem to do the trick:
Exec('explorer', 'https://www.example.com/', '', SW_SHOW, ewNoWait, ErrorCode);
I believe it works, because while the code obviously runs explorer
process elevated, the Explorer does not allow multiple instances. So the new instance will just ask the existing instance of explorer (which is not elevated) to open the URL. The existing non-elevated instance of Explorer will run non-elevated instance of the web browser.
It's similar to how the web browsers themselves work. If you run chrome url
(or any other browser) from an elevated process (like the un/installer), if no Chrome process is running yet, the URL opens in new elevated Chrome browser. But if some Chrome process is already running, the new elevated process will just ask the existing non-elevated process to open the URL.
The only difference is that while there is not always some web browser process running, there is always an (unelevated) Explorer process. And actually, even if there's not, Explorer de-elevates itself.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…