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
- :
- Change admin requirements for uninstall (from Control Panel)
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
Mar 22, 2013
10:53 AM
Change admin requirements for uninstall (from Control Panel)
I give the user the option to install either as admin or as a non-admin user, since many people installing this application would not have an admin account or password. To allow the install to run as admin or non-admin, I compiled the InstallShield project to not require admin, and then set it at run time (with runas and ShellExecute in Win32). I then added an uninstall application that checks if admin access is required for uninstalling, and then prompts the user if necessary for admin credentials before uninstalling through the regular InstallShield interface. Unfortunately, if a user decides to uninstall from the control panel (rather than the uninstall application I wrote), because the original installer does not require admin privileges, it does not ask the user for admin credentials and runs as a regular user, and so it can't successfully uninstall the whole application if access to an admin location is required.
Is there a way to tell the uninstaller that admin privileges are required, or a way to change the uninstall application launched from the control panel to point to my uninstall application? I'd prefer a solution outside of InstallShield if possible (ie. one where I can change the preferences from my own exe after the install is complete).
Is there a way to tell the uninstaller that admin privileges are required, or a way to change the uninstall application launched from the control panel to point to my uninstall application? I'd prefer a solution outside of InstallShield if possible (ie. one where I can change the preferences from my own exe after the install is complete).
(1) Reply
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Mar 28, 2013
10:01 AM
If it is a InstallScript or InstallScript MSI project, when you uninstall your product by clicking "Remove" from Add/Remove Program, it calls OnUninstall() in your project. If you explicitly define the function and put your privilege elevation logic there, you might get yourself around the issue.