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
- :
- Add Registry Keys Only If User Has Administrator Rights, Otherwise Don't
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
Jan 12, 2014
07:19 PM
Add Registry Keys Only If User Has Administrator Rights, Otherwise Don't
Is there a way to put a condition into the installer so that if the person running the installer does NOT have Admin rights then skip a step? I want to skip making additions to the registry if the user is not logged in as Administrator.
Thank you.
Thank you.
(1) Reply
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Jan 23, 2014
06:23 PM
Typically, an installer is run with administrator privileges in order to make most changes on system, e.g., in "Programs Files" and "Windows" folder, as well as "HKEY_LOCAL_MACHINE" registry hive, etc.
Registry changes in Registry table are gated by component. So, you can control installation of specific registry entry by specifying a condition on the component. You can use Privileged property and/or AdminUser property.
Alternatively, you can use a custom action to create registry entry. However, I would not recommend this route, since for every custom action created, there should be a corresponding rollback custom action, a custom action for uninstallation and its corresponding rollback custom action. In this case, using custom actions is a lot of work for a registry entry when there exists a simpler approach.
Registry changes in Registry table are gated by component. So, you can control installation of specific registry entry by specifying a condition on the component. You can use Privileged property and/or AdminUser property.
Alternatively, you can use a custom action to create registry entry. However, I would not recommend this route, since for every custom action created, there should be a corresponding rollback custom action, a custom action for uninstallation and its corresponding rollback custom action. In this case, using custom actions is a lot of work for a registry entry when there exists a simpler approach.
