Tom's Hardware > Forum > Windows XP > Configuration & Customize > registry editing question

registry editing question

Forum Windows XP : Configuration & Customize - registry editing question

Tom's Hardware: Over 1.4 million members in 6 different countries available to answer all your high-tech questions. Sign up now! Its free!
Word :    Username :           
 

Archived from groups: microsoft.public.windowsxp.customize (More info?)

 

I am writing a script that changes specific registry values and have kind of
hit a wall with a certain value. The problem is the path to the value varies
from system to system. Does anybody know of a way around this? For example:

PC1: HKCU\Software\America Online\ffd0-aab5cfe-acbd\Value to Change

PC2: HKCU\Software\America Online\ffc9-af32acfe-acbd\Value to Change

If anybody knows how to script that or can point me in the general direction
to somebody who does, I'd really appreciate it!

Thanks,
-Nate

Sponsored Links
Register or log in to remove.

Archived from groups: microsoft.public.windowsxp.customize (More info?)

 

I don't have AOL so I don't know what their registry entries look like.

If the 'ffd0-aab5cfe-acbd' portion of the key exists elsewhere in the registry as a value under a known key, you can read that first, then use that value to build the path to the key in question.

Otherwise You'll probably have to enumerate the subkeys of:

'HKCU\Software\America Online'

After you have your subkeys, loop through them looking for the one in question. If you know it's the only subkey with a "-" in its name, something like:

For each subkey in subkeys
If InStr(subkey,"-" ) Then
myval = WshShell.RegRead("HKCU\Software\America Online\" & subkey & "\ValuetoChange" )
....
Exit For
End If
Next

Good Luck,
Keith




"Nate" <Nate@discussions.microsoft.com> wrote in message news:4C36E23A-D4C2-42AF-8F84-5F6622636884@microsoft.com...
> I am writing a script that changes specific registry values and have kind of
> hit a wall with a certain value. The problem is the path to the value varies
> from system to system. Does anybody know of a way around this? For example:
>
> PC1: HKCU\Software\America Online\ffd0-aab5cfe-acbd\Value to Change
>
> PC2: HKCU\Software\America Online\ffc9-af32acfe-acbd\Value to Change
>
> If anybody knows how to script that or can point me in the general direction
> to somebody who does, I'd really appreciate it!
>
> Thanks,
> -Nate

Reply to Anonymous

Archived from groups: microsoft.public.windowsxp.customize (More info?)

 

Thanks Keith, that's exactly what I needed to know.

Just so everybody knows I'm not a smack, I don't have AOL either but I'm in
the business of helping people who do. I'm writing a script that runs after
an AOL install to clean-up everything it puts in there other than the main
program. Besides this one registry entry, I got everything else. You
install AOL, the script runs, you reboot, and all you see is an AOL icon on
the desktop and in the start menu. No screensaver, no deskbar, no IE
toolbar, no reg runs, no garbage other than the main program itself. If
anybody else wants this script, let me know.

"Keith Miller" wrote:

> I don't have AOL so I don't know what their registry entries look like.
>
> If the 'ffd0-aab5cfe-acbd' portion of the key exists elsewhere in the registry as a value under a known key, you can read that first, then use that value to build the path to the key in question.
>
> Otherwise You'll probably have to enumerate the subkeys of:
>
> 'HKCU\Software\America Online'
>
> After you have your subkeys, loop through them looking for the one in question. If you know it's the only subkey with a "-" in its name, something like:
>
> For each subkey in subkeys
> If InStr(subkey,"-" ) Then
> myval = WshShell.RegRead("HKCU\Software\America Online\" & subkey & "\ValuetoChange" )
> ....
> Exit For
> End If
> Next
>
> Good Luck,
> Keith
>
>
>
>
> "Nate" <Nate@discussions.microsoft.com> wrote in message news:4C36E23A-D4C2-42AF-8F84-5F6622636884@microsoft.com...
> > I am writing a script that changes specific registry values and have kind of
> > hit a wall with a certain value. The problem is the path to the value varies
> > from system to system. Does anybody know of a way around this? For example:
> >
> > PC1: HKCU\Software\America Online\ffd0-aab5cfe-acbd\Value to Change
> >
> > PC2: HKCU\Software\America Online\ffc9-af32acfe-acbd\Value to Change
> >
> > If anybody knows how to script that or can point me in the general direction
> > to somebody who does, I'd really appreciate it!
> >
> > Thanks,
> > -Nate
>

Reply to Anonymous
Tom's Hardware > Forum > Windows XP > Configuration & Customize > registry editing question
Go to:

There are 1184 identified and unidentified users. To see the list of identified users, Click here.

Please mind

You are about to answer a thread that has been inactive for more than 6 months.
If you still wish to proceed, please ensure that your posting is original and does not duplicate or overlap any prior responses to this thread.

Add a reply Cancel
Sponsored links
  • Ask the community now
  • Publish
Ad
They won a badge
Join us in greeting them