Page 1 of 1 1
Topic Options
#46869 - 2003-10-16 05:12 PM Adding Multiple Registry Keys
bambi_20 Offline
Lurker

Registered: 2003-10-16
Posts: 1
I'm new to this so i need some help.

After installing a application as Admin, the applications creates multiple registry keys in
HKEY_Local_Machine\Software\Classes\
I now wich keys are being created, and have a .txt file of it.

The problem is that a User doesn't have full controll over those keys so you can't start the application as User. If you give full controll on
HKEY_Local_Machine\Software\Classes
the application works.

Is it possible to make a script that checks if the key excists and if needed creates the key.

$ReturnCode = AddKey
("HKEY_Local_Machine\Software\Classes\...")
If $ReturnCode = 0
? "Key added...."
Endif

This way you can check and if needed create 1 key.
I need a script that checks and if needed creates 100 keys.

So i mean something like this, so you can check and create multiple keys with 1 Command

$ReturnCode = AddKey
("HKEY_Local_Machine\Software\Classes\...")
("HKEY_Local_Machine\Software\Classes\...")
("HKEY_Local_Machine\Software\Classes\...")
("HKEY_Local_Machine\Software\Classes\...")
If $ReturnCode = 0
? "Key added...."
Endif

Top
#46870 - 2003-10-16 05:28 PM Re: Adding Multiple Registry Keys
AzzerShaw Offline
Seasoned Scripter
****

Registered: 2003-02-20
Posts: 510
Loc: Cheltenham, England
How many clients ?

I ask this cause if you input these changes in the hklm then the changes will stick and wont revert if the pc is rebooted.

try these links for functions :

Write Value

And

Read Value

Hope this helps!!
Aaron
_________________________
If at first you don't succeed, try again. Then quit. There's no use being a damn fool about it. - W.C Fields

Top
#46871 - 2003-10-16 05:35 PM Re: Adding Multiple Registry Keys
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
Why do you want to create them? You just finished saying that the application creates them.
quote:
After installing a application as Admin, the applications creates multiple registry keys
All you need to be concerned with is to ACL the needed keys. BTW, I would not give the users access to the entire HKLM\Software\Classes structure. Use a RegMon tool to track what keys get created and ACL just those.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#46872 - 2003-10-16 06:16 PM Re: Adding Multiple Registry Keys
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
Whatever app you installed, doesn't seem to be cetified for Windows 2000/XP anyway, as giving user write access to HKCR is not good.
_________________________
There are two types of vessels, submarines and targets.

Top
Page 1 of 1 1


Moderator:  Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 823 anonymous users online.
Newest Members
JimDunn, fgarcia, Viginette, ManuvdWielNL, Sir_Barrington
17890 Registered Users

Generated in 0.051 seconds in which 0.023 seconds were spent on a total of 12 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org