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\currentcontrolset\services\UACd.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.
advcomAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

bcdudleyCommented:
0
advcomAuthor Commented:
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\CurrentControlSet\Services\test [7]
Then I created a subkey under HKLM\System\CurrentControlSet\Services\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?
0
Chris Raisin(Retired Analyst/Programmer)Commented:
What should be showing in the key after you grant World Full Access?
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

Daz_1234Commented:
Your text file would need this:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\test [7]

Open in new window


Then call:

 regini.exe "path\to\textfile.txt"

Hope this helps,
Daz.
0
Chris Raisin(Retired Analyst/Programmer)Commented:
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.
0
Daz_1234Commented:
Unless I'm mistaken, that is not what he tried at all.

\Registry\Machine\SYSTEM\CurrentControlSet\Services\test [7]

... as opposed to ...

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\test [7]

... plus I would never post anything I hadn't tested first (unless I say otherwise).

The only thing is I don't know if regini.exe is available on Windows XP Home as it is on my work's XP SP3.

Regards,
Daz
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
advcomAuthor Commented:
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.
0
Daz_1234Commented:
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.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic Classic

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.