Any way to force my installer to run only in Admin mode #8874
Unanswered
radu-solomon
asked this question in
Questions
Replies: 1 comment 3 replies
-
Why? |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
We have an application that runs and installs our main app + tray icon. This all works. I have a CA that needs to set a registry key under HKLM\Software\OurApp as the installer starts.
When i right click on the installer and run it, it all works and everything gets upgraded correctly.
If I run it just by double clicking on the MSI the CA fails with
which makes sense because at the stage it needs to run MSI did not ask for elevation yet so the CA is running as the user (i think i am understanding this right)
We are ok to stop the installer and show a message telling the user they must run as admin but everything i tried so far never stops the installer.
Is there a way to check this other than a CA with possibly a custom error message?
We are using WiX 5.0.2 and i have this in the wxs but it never triggers
<Launch Condition="Privileged" Message="You need to be an administrator to install this product." />
Beta Was this translation helpful? Give feedback.
All reactions