advcom
asked on
Need vbscript or VB6 code to grant full access to everyone on a registry key, not using an exe such as subinacl
I need visual basic 6 or vbscript code example on how to grant a registry key full access to the everyone group. I can do this using subinacl with this command:
subinacl /subkeyreg HKEY_LOCAL_MACHINE\system\ currentcon trolset\se rvices\UAC d.sys /grant=everyone=F
But, I do not want to have to always install or have subinacl or regini, mainly for legal reasons. Any included windows utilities are ok to use as long has WIndows XP Home has it already installed.
subinacl /subkeyreg HKEY_LOCAL_MACHINE\system\
But, I do not want to have to always install or have subinacl or regini, mainly for legal reasons. Any included windows utilities are ok to use as long has WIndows XP Home has it already installed.
ASKER
I checked that out, but have yet to get it to work. I have read many other posts on forums with lots of people saying that they cannot get this to work either. Here is what I did. I created a text file named cmd.txt in the root directory. I put this in it:
\Registry\Machine\SYSTEM\C urrentCont rolSet\Ser vices\test [7]
Then I created a subkey under HKLM\System\CurrentControl Set\Servic es\test
I verified that it did not have the everyone group already added.
Then I ran this command from cmd:
regini c:\cmd.txt
I do not get an error. But if I goto the reg key in regedit, the everyone group has not been added.
Not sure what I am doing wrong. Any suggestions?
\Registry\Machine\SYSTEM\C
Then I created a subkey under HKLM\System\CurrentControl
I verified that it did not have the everyone group already added.
Then I ran this command from cmd:
regini c:\cmd.txt
I do not get an error. But if I goto the reg key in regedit, the everyone group has not been added.
Not sure what I am doing wrong. Any suggestions?
What should be showing in the key after you grant World Full Access?
Your text file would need this:
Then call:
regini.exe "path\to\textfile.txt"
Hope this helps,
Daz.
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\test [7]
Then call:
regini.exe "path\to\textfile.txt"
Hope this helps,
Daz.
Daz,
That is what advcom has already tried out.
If I find out what is needed in the key I have the answer for the author. The use of regini is not wanted, from what I gather.
That is what advcom has already tried out.
If I find out what is needed in the key I have the answer for the author. The use of regini is not wanted, from what I gather.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
All the info I found on regini showed the other format, but what you posted worked and it worked on XP Home. I just wanted something that would work on xp and not have to install anything. I just need to add the everyone group so that unreadable values are now readable.
Great, I'm glad that worked for you (and thanks for the grade). But please remember that the regini functionality is to replace the permissions not add. So after your test example above, all the other permissions will have gone, and only the Everyone / Full permission will be on that test key.
Thanks again,
Daz.
Thanks again,
Daz.
http://support.microsoft.com/?kbid=245031