PDA

View Full Version : Change the permission of a "key" in the Windows Registry


rajat_bapi_mallick
2006-02-19, 06:11 AM
Hi !

Is there any way that I can change the permission of a "key" in the windows registry (such as "HKEY_LOCAL_MACHINE\SOFTWARE\Myname" and user account type: Administrator) via visual LISP ?

Thanks
Rajat Mallick

peter
2006-02-19, 07:03 PM
Attached is a set of routines that access the registry.


You should be able to figure it out from there.

Peter

rajat_bapi_mallick
2006-02-20, 05:47 PM
Thanks Peter,

But have you noticed that the data created in "HKEY_CURRENT_USER\....\MyCustom" does not exists, when you logon with a different username ?
To overcome this problem, I have tried to store data in "HKEY_LOCAL_MACHINE\....\MyCustom" which always exists with all username.
But there is a problem. You cannot change the label or its value from limited/restricted username, unless otherwise you set "permissions" to full control (right click on a "key" -> permissions -> click on "allow" "full control" to all account type) form administrative user account.

But this is a manual procedure. How can I do this using Visual LISP ??

Thanks again.
Rajat Mallick