Go Back  Xtreme Visual Basic Talk > Legacy Visual Basic (VB 4/5/6) > File I/O and Registry > change registry key permissions


Reply
 
Thread Tools Display Modes
  #1  
Old 05-12-2003, 12:41 PM
X-2-X X-2-X is offline
Freshman
 
Join Date: May 2003
Location: Lagos , NIGERIA
Posts: 43
Default change registry key permissions


Hello,
I would like to allow the win2k user accout full control over a registry key my app creates , does any body have any clue

Thanks in advance.
Reply With Quote
  #2  
Old 05-12-2003, 02:32 PM
Banjo's Avatar
Banjo Banjo is offline
Hell's Angel

Retired Moderator
* Guru *
 
Join Date: Jul 2001
Location: Yorkshire, UK
Posts: 10,394
Default

Quote:
the win2k user accout
What's that then?
__________________
A wise one man once said "what you talking about dog breath"
Reply With Quote
  #3  
Old 05-13-2003, 07:28 AM
X-2-X X-2-X is offline
Freshman
 
Join Date: May 2003
Location: Lagos , NIGERIA
Posts: 43
Unhappy

Quote:
Originally Posted by Banjo
What's that then?


Well wind0ws 2000 has six inbuilt account groups
Administrators
Power Users
Back up Operators
Users
. . . . . and
Guest


When u create a new account in windows 2000 , it is placed by default in the User group , so i want members of this group to have "full control" over registry keys created by my app , in HKLM

Somebody please help
Reply With Quote
  #4  
Old 05-13-2003, 08:39 AM
Banjo's Avatar
Banjo Banjo is offline
Hell's Angel

Retired Moderator
* Guru *
 
Join Date: Jul 2001
Location: Yorkshire, UK
Posts: 10,394
Default

Ah, why didn't you say "user group" instead of "user account" in the first place

In answer to your question, it is possible but requires the use of the security api function. Unfortunately these are some of the more arcance functions in the API. I haven't the time to run up an example for you, however you should use MSDN to check out these functions:

RegSetKeySecurity
SetEntriesInACL

Of course, you need to be able to open the key to set these ACEs so your program will need to be run from an administrative account first in order to set the necessary access.
__________________
A wise one man once said "what you talking about dog breath"
Reply With Quote
  #5  
Old 05-13-2003, 09:14 AM
X-2-X X-2-X is offline
Freshman
 
Join Date: May 2003
Location: Lagos , NIGERIA
Posts: 43
Default

Quote:
Originally Posted by Banjo
Ah, why didn't you say "user group" instead of "user account" in the first place

In answer to your question, it is possible but requires the use of the security api function. Unfortunately these are some of the more arcance functions in the API. I haven't the time to run up an example for you, however you should use MSDN to check out these functions:

RegSetKeySecurity
SetEntriesInACL

Of course, you need to be able to open the key to set these ACEs so your program will need to be run from an administrative account first in order to set the necessary access.



Thank you.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Registry darkforcesjedi General 1 01-27-2003 02:29 PM
Registry Permissions MartinEDiT API 3 11-21-2002 01:08 PM
What is Change in Windows Registry Kashif Database and Reporting 0 09-27-2002 12:48 AM
can i change the registry key value?? gash28 General 4 03-12-2002 06:58 AM
How to change registry info? fordman069 General 1 11-02-2001 07:12 PM

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
 
 
-->