|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Setting Regisrty PermissionI need to be able to programmincally set (USER) permissions on a registry
key. I've read the Knowledge Base articles and they all point to a couple of articles that seem to have been pulled form the knowledge base. (What's up with that?) I've so tried numerous samples from various forums, none of them work. To be specific, my code will be installed by the admin (assuming the admin has the machine locked down) and at this time I want to set permission for a registry key so that when users log on they (my code) has access to that key. Help.... Austin,
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfmicrosoftwin32registryclasstopic.asp I got it, you want to set the registry keys not for the Admin as the current local user and not all users but for another user which can logon on this computer. But therefore his/here User registry information is not at the moment in the registry. Not that I know it, however maybe others had the same problems reading your message as I had and understand it now better. I write this because reading your message this knowledge came very late, I had already made another answer, I have left that link from that message. Cor Show quoteHide quote "Austin Myers" <aust***@grm.net> schreef in bericht news:eyJaNvfyGHA.476@TK2MSFTNGP06.phx.gbl... >I need to be able to programmincally set (USER) permissions on a registry >key. I've read the Knowledge Base articles and they all point to a couple >of articles that seem to have been pulled form the knowledge base. (What's >up with that?) I've so tried numerous samples from various forums, none of >them work. > > To be specific, my code will be installed by the admin (assuming the admin > has the machine locked down) and at this time I want to set permission for > a registry key so that when users log on they (my code) has access to that > key. > > Help.... > > > > "Cor Ligthert [MVP]" <notmyfirstn***@planet.nl> wrote in message Almost, I want to simply have the admin (during the install of my code) to news:%23EPla1fyGHA.4976@TK2MSFTNGP04.phx.gbl... > Austin, > > http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfmicrosoftwin32registryclasstopic.asp > I got it, you want to set the registry keys not for the Admin as the > current local user and not all users but for another user which can logon > on this computer. make a key read and write accessible with my add in regardless of the users permissions or rights. I do NOT want the admin to be required to make manual changes to the registry. Hence my need to do it in code. An example: Several people use a machine as limited users. The Admin installs my add in, which writes keys to the registry. Once completed ANY user that logs on the machine should be able to use the add in and access the needed registry keys. As an FYI: I am storing my products registration key in the registry along with some add in settings, etc. 1. Do you want to set registry acces by code ? or 2 do you want that your
code can access the registry keys while the user ( with non admin priviliges ) can access the registry through your app ? both are 2 total differnt things if you want to write information for a user in the registry , you do this in the current user section you do not need to set specific rights for the user in this section as it is there own private data regards Michel Posseth Show quoteHide quote "Austin Myers" <aust***@grm.net> schreef in bericht news:eyJaNvfyGHA.476@TK2MSFTNGP06.phx.gbl... >I need to be able to programmincally set (USER) permissions on a registry >key. I've read the Knowledge Base articles and they all point to a couple >of articles that seem to have been pulled form the knowledge base. (What's >up with that?) I've so tried numerous samples from various forums, none of >them work. > > To be specific, my code will be installed by the admin (assuming the admin > has the machine locked down) and at this time I want to set permission for > a registry key so that when users log on they (my code) has access to that > key. > > Help.... > > > > "Michel Posseth [MCP]" <M***@posseth.com> wrote in message Yes to both. When the Admin installs my code, I want it to make the needed news:%23Q8jZ%23fyGHA.1252@TK2MSFTNGP04.phx.gbl... > > 1. Do you want to set registry acces by code ? or 2 do you want that > your code can access the registry keys while the user ( with non admin > priviliges ) can access the registry through your app ? permission changes at that time so the Admin does not have to do it manually. (With say regedit) After that change has been made, I want my code to be able to access those keys regardless of the users rights. Austin ,,
if i understand you corectly , you want to set a license key during installation / registration by the admin and want to read this key when the user starts the program vor validation ? ( am i correct ) in this case write the key under HKEY_LOCAL_MACHINE\SOFTWARE\ the local ACL wil take care of this as the administrator has full priviliges and the users have read priviliges under this key hth Michel Show quoteHide quote "Austin Myers" <aust***@grm.net> schreef in bericht news:uzLYlBgyGHA.2208@TK2MSFTNGP03.phx.gbl... > > "Michel Posseth [MCP]" <M***@posseth.com> wrote in message > news:%23Q8jZ%23fyGHA.1252@TK2MSFTNGP04.phx.gbl... >> >> 1. Do you want to set registry acces by code ? or 2 do you want that >> your code can access the registry keys while the user ( with non admin >> priviliges ) can access the registry through your app ? > > > Yes to both. When the Admin installs my code, I want it to make the > needed permission changes at that time so the Admin does not have to do it > manually. (With say regedit) After that change has been made, I want my > code to be able to access those keys regardless of the users rights. > > > > > "Michel Posseth [MCP]" <M***@posseth.com> wrote in message Correct, mostly. (I also need to store some settings from my code.)news:ulpXjJgyGHA.4232@TK2MSFTNGP04.phx.gbl... > Austin ,, > > if i understand you corectly , you want to set a license key during > installation / registration by the admin > and want to read this key when the user starts the program vor validation > ? ( am i correct ) > in this case write the key under HKEY_LOCAL_MACHINE\SOFTWARE\ Did, and when I log in as a limited user and my code tries to read it I get an error saying I don't have permission to use that part of the registry. > the local ACL wil take care of this as the administrator has full Not that I can see.> priviliges and the users have read priviliges under this key I fully admit that I am floundering here with .NET, it was soooo much simpler in VB. Can I assume what I want can not be done with .net?
Show quoteHide quote "Austin Myers" <aust***@grm.net> wrote in message news:eyJaNvfyGHA.476@TK2MSFTNGP06.phx.gbl... >I need to be able to programmincally set (USER) permissions on a registry >key. I've read the Knowledge Base articles and they all point to a couple >of articles that seem to have been pulled form the knowledge base. (What's >up with that?) I've so tried numerous samples from various forums, none of >them work. > > To be specific, my code will be installed by the admin (assuming the admin > has the machine locked down) and at this time I want to set permission for > a registry key so that when users log on they (my code) has access to that > key. > > Help.... > > > > |
|||||||||||||||||||||||