Sign in with
Sign up | Sign in
Your question

registry editing question

Last response: in Windows XP
Share
Anonymous
April 13, 2005 4:57:02 AM

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
Anonymous
April 13, 2005 12:05:03 PM

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
Anonymous
April 13, 2005 4:35:06 PM

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