Registry Key Fail Without Prompt - Advanced Installer Community
mikebei
Posts: 6
Joined: Mon Feb 01, 2016 3:47 pm

Registry Key Fail Without Prompt

If an installer is configured to add a registry key, but the registry permissions are set to deny adding the key, the user will get a warning window when the installer tries to write the key. The user is prompted with "Could not write _____ to key _____. Verify that you have sufficient access to that key, or contact your support personnel." with the options of "Abort", "Retry" and "Ignore".

In my case, the registry key presence improves the user experience but is not necessary for the application to function properly. Is there any way to have the installer silently default to ignore and continue on without showing the warning to the user?
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: Registry Key Fail Without Prompt

Hi,

I'm afraid that there is no way to choose between the "Abort", "Retry" and "Ignore" options during a silent installation. However you can set the appropriate conditions for your registry entries, so they will not be installed in case the package is not installed with administrator rights.

To achieve this, you can select each of your registry entries, then press the "F8" keyboard button to be redirected to their related components from the "Organization" page and in the "Condition" field use the "Privileged" property as a condition. In this case, the installer will try to create those registry entries only if administrator rights were given to the package.

Let me know if this helped, otherwise give me more details about your scenario.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
mikebei
Posts: 6
Joined: Mon Feb 01, 2016 3:47 pm

Re: Registry Key Fail Without Prompt

The product being installed is one that most commonly will be run at schools and colleges, but will also be installed on personal computers as well. The intention is that it may be installed by administrators or standard users, but prerequisite behavior would differ based on privileges. The registry keys the installer is trying to add do live within HKEY_CURRENT_USER (the app itself also tries to write keys there at runtime as well), so a non-admin should have permission. However, past experience has shown that schools widely vary on how they set account permissions.

I have been trying to cover whatever account/system variants I can think of to offer the smoothest user experience without producing warnings or errors unless they truly are show-stoppers. The reg keys I'm writing are not critical and will just improve the user experience later on in application usage. The way I tested this that produced the Abort/Retry/Ignore dialog is by explicitly denying read/write access to the parent key in the registry. It's a bit of an edge case from what I would expect normal conditions to be, but schools have surprised us before.

I do want the installer to attempt to write the keys regardless of privileges. I was just hoping to be able to move on without prompting the user if writing a key fails.
mikebei
Posts: 6
Joined: Mon Feb 01, 2016 3:47 pm

Re: Registry Key Fail Without Prompt

Worth mentioning is there are multiple keys that will be written to the same parent key. If permissions don't allow writing to the parent, the user will get a prompt for each subkey as they fail to be written. An approach that might be a reasonable compromise would be if they can somehow be grouped together so that if one key fails to be written, then no other key writes are even attempted. Is something like that possible?
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: Registry Key Fail Without Prompt

Hi,

I'm afraid that I'm not aware of any way to suppress that message or to set it to be displayed only once. In order to achieve this you can create your own custom action that writes your registry values only if it has permissions.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”