I attempted to put two values into my registry and was not successful using installshield 2021 R2. One attached image shows that I tried to enter the data in the Project Assistant/Registry screen and selected 'yes' to modify the data. I am doing this to my own PC and had removed these values previously to test. The other image shows the result of not having entries in my PC registery, after the install.
I noticed that when I test my application in debug in Visual Studio, I need to start Visual Studio as an Admin user, when it writes to the registry. Is there any way to give an installed package admin rights, so a user does not have to run it as admin?
Any answers would be greatly appreciated!
Thank you for your post.
Your installer is accessing HKEY_LOCAL_MACHINE which is a per-machine location for all users. No, there is no way of avoiding the fact that an Administrator will need to run your installer for it to work correctly. This is due to the security design of Windows itself, per how Microsoft designed Windows. Microsoft designed Windows to require an Administrator with elevated privileges to access per-machine locations for all users.
To force your installer to be run by an Administrator, if you are building only an MSI without a setup.exe, make sure that General Information > Require Administrative Privileges is set to Yes. If you are building an MSI with a setup.exe, make sure that the Releases > Release > Setup.exe Tab > Required Execution Level is set to Administrator. Please give these suggestions a try then rebuild the project and retest this issue. Does this issue still occur?
Please let us know if you have any questions or concerns. Thanks!
1. Thank you for your answer! I set the Required Administration level for setup.exe to Administrator and ran as Administrator. However the change did not enable the registry to get the2 settings. An image of the change I made, per the Revenera response is attached. Please advise.
2. Is it correct to say that any program that accesses the registry, whether read or write must have admin privs?. I believe this is what you said. Just making sure.