views:

34

answers:

1

I read the windows 7 Client Requirements and they don't seem to prohibit from writing in registry (Local Machine key).

I have a C# .exe application which reads/writes values in HKLM/Software/Company/Etc (It includes a manifest file and runs as standard-user).

When I deploy my application I have to tell the installer to create the key HKLM/Software/Company/Etc and give read/write permissions programmatically so that the application will not throw access denied exception when user who runs it is not an administrator.

Is this a good practice? If not, is there a better way (except for using current user key).

A: 

Policy No. 2 - Do not modify WRP protected resources.

So, no it is not a good practice, and it violates a Windows Logo requirements.

Technical requirement No. 9 - Support Multiuser Sessions

Doing things your way, you are not able to run concurrent sessions without conflict or disruption.

The right way is to use a HKCU, or, if possible, writing into files (located in user data folders).

Srx