🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: microsoft.public.win32.programmer.kernel
4 messages
4 total messages Started by Roland Jochems Fri, 23 Jul 1999 00:00
Change registry Privileges by API functions
#5
Author: Roland Jochems
Date: Fri, 23 Jul 1999 00:00
11 lines
1128 bytes
How can I change the privileges on the Registry for a particular user on a
WinNT4 Server/Workstation. I know how it can be done by RegEdt32 but how can
I do this by API.

I need to change the access right for the
HKEY_LOCAL_MACHINE//MICROSOFT/WINDOWS NT/CURRENTVERSION/WINLOGON to FULL
CONTROL

Thanks in Advance
Roland Jochems
VLT
Re: Change registry Privileges by API functions
#2
Author: Francisco M. Garcia Gomez
Date: Fri, 23 Jul 1999 00:00
21 lines
1078 bytes
Roland,

Look for MoveFileEx in the docs.

Hope it helps,

Roland Jochems wrote in message <7n919h$mh3$1@reader1.wxs.nl>...
>How can I change the privileges on the Registry for a particular user on a
>WinNT4 Server/Workstation. I know how it can be done by RegEdt32 but how
can
>I do this by API.
>
>I need to change the access right for the
>HKEY_LOCAL_MACHINE//MICROSOFT/WINDOWS NT/CURRENTVERSION/WINLOGON to FULL
>CONTROL
>
>Thanks in Advance
>Roland Jochems
>VLT
>
>
Re: Change registry Privileges by API functions
#3
Author: Francisco M. Garcia Gomez
Date: Fri, 23 Jul 1999 00:00
28 lines
1299 bytes
Sorry, this was an answer to "Urgent: Why WriteFile() to COM port blocks?".

Anyway, look for SetSecurityInfo.

Francisco M. Garcia Gomez wrote in message ...
>Roland,
>
>Look for MoveFileEx in the docs.
>
>Hope it helps,
>
>Roland Jochems wrote in message <7n919h$mh3$1@reader1.wxs.nl>...
>>How can I change the privileges on the Registry for a particular user on a
>>WinNT4 Server/Workstation. I know how it can be done by RegEdt32 but how
>can
>>I do this by API.
>>
>>I need to change the access right for the
>>HKEY_LOCAL_MACHINE//MICROSOFT/WINDOWS NT/CURRENTVERSION/WINLOGON to FULL
>>CONTROL
>>
>>Thanks in Advance
>>Roland Jochems
>>VLT
>>
>>
>
>
Re: Change registry Privileges by API functions
#4
Author: Felix Kasza [MVP]
Date: Fri, 23 Jul 1999 00:00
28 lines
1819 bytes
Roland,

 > How can I change the privileges on the Registry for a particular user on a
 > WinNT4 Server/Workstation. I know how it can be done by RegEdt32 but how can
 > I do this by API.

To change the permissions on a reg key ("privileges" are something
different), use RegGetKeySecurity() to read the current DACL. Build an
ACE with the desired permissions for the user you have in mind. Search
the ACL for an already-existing entry for this user -- if there is one,
OR its permissions with the ones you want to add; if there is none, add
your ACE to the end of the list. (You may have to reallocate the ACL to
do that.) Finally, call RegSetKeySecurity() to write the DACL back.

The Platform SDK contains an overview section on security and such;
Marshall Brain's "Win32 System Services" discusses the topic, and so do
Brent/Rector in their "Win32 Programming" book. There are also a few
MSDN articles -- search titles for "security".

-- 

Cheers,

Felix.

If you post a reply, kindly refrain from emailing it, too.
Note to spammers: felixk@mvps.org is my real email address.
No anti-spam address here. Just one comment: IN YOUR FACE!
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads