This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- Detecting admin in Vista when Privileged = 1 (always)
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Oct 15, 2008
07:50 PM
Detecting admin in Vista when Privileged = 1 (always)
I have an older installshield msi with a bunch of vbscript custom actions, many needing elevation. These should be rewritten to work as deferred in system context, but I just don't have time now.
To make this installer work correctly, the user needs to open a command prompt via "Run as Administrator" and use msiexec /I.
If they don't use an admistrator:cmd window, I need to give an error message. From my testing, the Privileged property is always set to 1, no matter how I launch the msi.
How can I detect if the msi is running with elevated privileges?
To make this installer work correctly, the user needs to open a command prompt via "Run as Administrator" and use msiexec /I.
If they don't use an admistrator:cmd window, I need to give an error message. From my testing, the Privileged property is always set to 1, no matter how I launch the msi.
How can I detect if the msi is running with elevated privileges?
2 Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Oct 16, 2008
03:52 AM
you can use MSIUSEREALADMINDETECTION to check if the user has administrative rights. http://msdn.microsoft.com/en-us/library/aa816403(VS.85).aspx
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Oct 17, 2008
07:22 AM
Thanks, that's exactly what I needed.
