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.
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

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.

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?
Chris Raisin(Retired Analyst/Programmer)Commented:
What should be showing in the key after you grant World Full Access?
Big Business Goals? Which KPIs Will Help You

The most successful MSPs rely on metrics – known as key performance indicators (KPIs) – for making informed decisions that help their businesses thrive, rather than just survive. This eBook provides an overview of the most important KPIs used by top MSPs.

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,
Chris Raisin(Retired Analyst/Programmer)Commented:

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.
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.


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.
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,
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.