PDA

View Full Version : Permissions to uninstall



tonisa
11-15-2010, 03:03 AM
Hi,
I build a setup which requieres Administrator-rights to be launched. On a XP Professional test environment I'm logged as standard-user (makes part of the users-group). Launching my setup.exe an admin-account is asked and setup ends successfully. So I continue to be logged as standard-user. Opening the control panel - Installed programs I see my newly added application and the "remove"-button is active. Pressing it no Admin-account is asked. Is there a way to force the uninstall to
- or hide the remove-button for non admin-accounts ?
- or ask Admin-account-priviliges for the remove-procedure ?

best regards
Toni Santa

linder
11-15-2010, 04:45 AM
Toni,

What you can do is to check (in your custom uninstall) if the user has admin rights. Similar to the attached code-snippet.

Hope this helps.

Friedrich

tonisa
11-15-2010, 05:34 AM
Hi Friedrich,
Helps much. Thank you.
Could be an idea for a previous version to introduce a flag that the uninstalling process must be executed with same privileges as the installer.

Toni