WinBatch Tech Support Home

Database Search

If you can't find the information using the categories below, post a question over in our WinBatch Tech Support Forum.

TechHome

wNT
plus

Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.

WntAccessAdd and Change/Modify Registry Entries

Keywords: 	  WntAccessAdd Change/Modify Registry Entries

Question:

I'm having a problem changing registry permissions.

Here is the code. The WntAccessAdd is returning a 1 (true), however, when I go into regedt32 the permission are still read.

If RegExistKey(@RegMachine,"SOFTWARE\Borland")
RegHandle=RegOpenKey(@RegMachine,"SOFTWARE\Borland")
wntAccessAdd("",RegHandle,"Users",400,"Reg:Modify",0)
RegCloseKey(RegHandle)
else
display(3,titlebar,"HKLM SOFTWARE\Borland does not exist!!") 
endif

Answer:

What permissions are on the key before wntAccessAdd() is called?

Also, are these permissions explicitly assigned or are they inherited?

REGEDT32.EXE won't show the "modify" or "change" permission in the "basic" view of the permissions. What I did see is that the inherited "read" permissions for "Users" changed to show that it was explicitly applied. Then, after clicking on the "Advanced..." button, I was able to see that the additional permission bits for "modify" had in fact been enabled. This change was also noted in the advanced view by the fact that the summary of the permissions had changed from "read" to "special". There simply is not a summary/basic view of the "modify" permissions for REGEDT32.EXE to show you.

Take a closer look in REGEDT32.EXE and examine the advanced permissions and get back to me as to whether or not the permissions have actually been updated or not.


Article ID:   W15562
File Created: 2003:05:13:11:28:54
Last Updated: 2003:05:13:11:28:54