cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
DataAnalyzer
Level 8

Uninstalling with Admin Rights if Admin Rights Originally Used to Install on the PC

We have a simple setup program that can install the program for the current user or machine. If they don't have admin rights, it's installed for the current user.

If they have admin rights, they have the option to install for the machine or just themself. Based on their selection, our settings go into the HKEY_LOCAL_MACHINE or HKEY_CURRENT_USER. WE use the HKEY_USER_SELECTABLE feature in IS to handle this automatically. That's great!

However, we are running into a problem when people uninstall the program. Apparently, users (non-admin) can uninstall the program since it appears on their list of programs to add/remove. When they uninstall, the registry items in the HKEY_LOCAL_MACHINE registry can't be deleted because they don't have edit rights.

1. Is there a property we can set so that when it's installed for the machine, Admin rights are required to uninstall and non-Admin users never have see the program to uninstall?

2. Our setup program can detect if it's already installed on the machine or user. Is there a place in the script where we can check this when they try to uninstall with insufficient rights and stop them? If so, how?

Thanks.
Labels (1)
0 Kudos
(2) Replies
Nick_Umanski
Level 7

Can't you do a search on the HKLM registry settings and if found have a CA which halts the install/uninstall if the setting is found and the user is not an Admin user?
0 Kudos
DataAnalyzer
Level 8

Yes, I can check for that registry key but I was hoping there'd be a property so that I could avoid writing any code since this is a permission issue. Seems odd that we can specify the installation requires Admin rights but the same doesn't apply for the person uninstalling it.
0 Kudos