RegistryReadKey with type REG_EXPAND_SZ

Technical support and scripting issues

Moderators: JRL, Dorian (MJT support)

Post Reply
User avatar
Captive
Macro Veteran
Posts: 213
Joined: Sun Oct 20, 2002 8:37 pm
Location: Colorado, USA

RegistryReadKey with type REG_EXPAND_SZ

Post by Captive » Sun Sep 14, 2003 7:06 am

RegistryReadKey>HKEY_CURRENT_USER,Control Panel\Colors,ActiveTitle,VActTitle
MessageModal>%VActTitle%Works, but:
RegistryReadKey>HKEY_LOCAL_MACHINE,SOFTWARE\Valve\Steam,InstallPath,sSteamPath
MessageModal>Steam found at: %sSteamPath%does not.
I'm assuming it's because the InstallPath is type REG_EXPAND_SZ rather than just REG_SZ.

Is this a limitation with msched? Other RRK entries with the same root_key and key work.

armsys
Automation Wizard
Posts: 1108
Joined: Wed Dec 04, 2002 10:28 am
Location: Hong Kong

Post by armsys » Mon Sep 15, 2003 12:33 am

Not sure it has anything to do with security. Please reveal the version of Windows. Thanks.

User avatar
Captive
Macro Veteran
Posts: 213
Joined: Sun Oct 20, 2002 8:37 pm
Location: Colorado, USA

Post by Captive » Mon Sep 15, 2003 1:09 am

armsys wrote:Not sure it has anything to do with security. Please reveal the version of Windows. Thanks.
WinderzXP. I heavily doubt it's a security issue. I can read other entries with the same root_key + key, just not if the type is REG_EXPAND_SZ.

Dave1

Post by Dave1 » Wed Sep 17, 2003 11:35 am

Hi,
I have not used the 'RegistryReadKey' but I used the 'RegistryWriteKey' a few times.
For the RegistryWriteKey>HKEY_CURRENT_USER, it works great for me so far.
But for the RegistryWriteKey>HKEY_LOCAL_MACHINE, it only works if I logged in with admin right.
I heard that there is a vb script that could allow an user to change registry. Am I mis-informed?
Thanks

User avatar
Captive
Macro Veteran
Posts: 213
Joined: Sun Oct 20, 2002 8:37 pm
Location: Colorado, USA

Post by Captive » Wed Sep 17, 2003 2:38 pm

Other entries under the same rook key works just fine.
Example:RegistryReadKey>HKEY_LOCAL_MACHINE,SOFTWARE\Valve\Steam,Rate,sSteamPathworks fine, which is type REG_SV.

User avatar
Captive
Macro Veteran
Posts: 213
Joined: Sun Oct 20, 2002 8:37 pm
Location: Colorado, USA

Post by Captive » Thu Nov 20, 2003 5:54 pm

Still occurs in v7.2.043 - is this something I can fix in my OS, or is it a problem in MS. ?

User avatar
Captive
Macro Veteran
Posts: 213
Joined: Sun Oct 20, 2002 8:37 pm
Location: Colorado, USA

Post by Captive » Sat Nov 06, 2004 12:03 am

This bug still exists in v7.3.01.

User avatar
Bob Hansen
Automation Wizard
Posts: 2475
Joined: Tue Sep 24, 2002 3:47 am
Location: Salem, New Hampshire, US
Contact:

Post by Bob Hansen » Sat Nov 06, 2004 12:19 am

Be sure that there is no trailing space at the end of
RegistryReadKey>HKEY_LOCAL_MACHINE,SOFTWARE\Valve\Steam,InstallPath,sSteamPath

%sSteamPath % is not the same as %sSteamPath%
Hope this was helpful..................good luck,
Bob
A humble man and PROUD of it!

User avatar
Captive
Macro Veteran
Posts: 213
Joined: Sun Oct 20, 2002 8:37 pm
Location: Colorado, USA

Post by Captive » Sat Nov 06, 2004 12:32 am

Yep, checked. I've always been carefull about extra spaces. :]

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts