[wix-devs] BA elevated
Vanniekerk, Tyrel (GE Healthcare)
tyrel.vanniekerk at ge.com
Wed Sep 29 09:34:46 PDT 2021
My apologies. I thought I posted this in the users group. I will send it over to there.
From: wix-devs <wix-devs-bounces at lists.wixtoolset.org> On Behalf Of Vanniekerk, Tyrel (GE Healthcare) via wix-devs
Sent: Wednesday, September 29, 2021 11:26 AM
To: wix-devs at lists.wixtoolset.org
Cc: Vanniekerk, Tyrel (GE Healthcare) <tyrel.vanniekerk at ge.com>
Subject: EXT: [wix-devs] BA elevated
Currently we have a check in all of our installers that gives an error if the installer is not run as administrator. We never change the system state during the UI phase and I have tried several times to get everything to work without running with elevated permissions, but alas, some checks with LDAP and IIS just don't work unless you are running with elevated permissions.
Our approach works for a regular install, but when you click modify on the installed application, the install fails when it checks some things in IIS. For instance, we check if the default site is running, if certain ports are in use etc. We are not modifying the system state and this action is a verification step to ensure the user entered correct information before continuing the install, so it's not like we can run the at a different point in the install (before the UI, during the elevated MSI etc.)
I saw a post where Rob said to run IBootstrapperApplicationEngine->Elevate() right away. I tried this at various points, but no luck yet. I needed to wait for the Engine property to not be null and if I run it early on I get the prompt to elevate, but the setup starts running without a UI (I had to kill it from task manager). If I run it when I start my WPF window, passing the window handle into the Elevate function, I get the prompt, but the UI is still not running in elevated mode.
What's the trick to doing this? I can't help that the UI requires elevated rights, I am not violating Windows best practices by making changes etc., I just need this to work.
"Anyway, if you want the "elevate right away" behavior, your BA can call "IBootstrapperApplicationEngine->Elevate()" right away. If you have a splash screen then you'll still have a better chance showing up on without being stuck blinking in the task bar.", Rob Mensching, ten years ago... :D ____________________________________________________________________
WiX Toolset Developer Mailing List provided by FireGiant http://www.firegiant.com/
More information about the wix-devs