TheRocket
Posts: 32
Joined: Thu Jul 26, 2012 6:55 pm

Conditionally set permissions on a registry key

Hi,

In my setup, i would need to change the permissions on an existing registry key in the system.

The key is HK_LM\Software\ODBC\ODBC.INI

If the computer is in a domain, I would like to add the "domain users" as full control over this key.
also, I would like to add the "computer\users" as full control over this key, supporting the case the computer is not in a domain. It can be also set if it is in a domain.

If I set both users in the registy permission tab, (leaving the domain field blank) I'll get errors because "Domain users" doesn't exists on a computer that is not on a domain...

---------------------------
MyProject Setup
---------------------------
An error occurred while applying security settings. Domain Users is not a valid user or group. This could be a problem with the package, or a problem connecting to a domain controller on the network. Check your network connection and click "Retry", or "Cancel" to end the install.
---------------------------
Retry Cancel
---------------------------

How can I set conditions to not apply this Domain users permission when the computer is not in a domain? I guess in fact Advanced installer should not apply the "Domain Users" if the computer is not in a domain...

I'm using version 9.3, not found much information about this fix in future versions...

Thanks!
Daniel
Posts: 8240
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Conditionally set permissions on a registry key

Hello,

I'm afraid we don't have predefined support for this. However, in order to achieve what you want you can create two version of your registry key (one containing permissions for a computer which belongs to a domain and one containing permissions for a computer which is not in a domain) and install them based on a related condition. Please take a look on our "How to install different versions of a registry entry based on the Operating System" article which may be useful for you.

If you have any questions let us know.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
TheRocket
Posts: 32
Joined: Thu Jul 26, 2012 6:55 pm

Re: Conditionally set permissions on a registry key

Ahh I see the trick.

I was able to configure all this, however I see a bad side effect:

It seems I loose the "inherit the permissions from the parent"... The only permissions I have is the "system" entry and "users" which I wanted. Default system permissions are lost...
Daniel
Posts: 8240
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Conditionally set permissions on a registry key

Hello,

I'm afraid I don't fully understand what you mean. Can you give us more details about this (maybe exemplify)?

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
TheRocket
Posts: 32
Joined: Thu Jul 26, 2012 6:55 pm

Re: Conditionally set permissions on a registry key

Just re-searched in the forums and in fact I have the same issue described in thread http://www.advancedinstaller.com/forums ... f=2&t=8396

The solution appears to be using xcals to set the permissions, but I read this only works on folders...

In my case as it is a permission "patch", I can leave it outside of the installer for now.

Thanks for your help on this!

Return to “Common Problems”