Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


reading registry key string values in to an array

 
Logged in as: Guest
arrSession:exec spGetSession 2,2,36547
 Active Users: There are 0 members and 0 guests.
 Users viewing this topic: none
 

 

 
  
  Printable Version
All Forums >> [Scripting] >> WSH & Client Side VBScript >> reading registry key string values in to an array
  Do you like VisualBasicScript.com? Link to us and help spread the word about our forum. Thanks!
Page: [1]
Login
Message << Older Topic   Newer Topic >>
 reading registry key string values in to an array - 7/27/2006 4:27:43 AM   
  osk406

 

Posts: 2
Score: 0
Joined: 7/27/2006
Status: offline
hi all,

I have a registry key called "packages" - HKLM\SOFTWARE\MYDOMAIN\PACKAGES
this key contains string values with value names such as "Package_252" or "Package_217"
there may be none of these string values or there may be quite a few.

I would like to be able to retrieve these value names in order to tell which workstations have which packages (if any)
I have checked out a few googles but they all seem to be about retrieving info about a 'known' string value.

A point in the right direction would be  appreciated.

Thanks very much.
Osk.
 
 
Post #: 1
 
 RE: reading registry key string values in to an array - 7/27/2006 5:33:03 AM   
  ebgreen


Posts: 5246
Score: 31
Joined: 7/12/2005
Status: offline
See if this points you in the right direction:


      

_____________________________

"... when you are good and crazy, oooh, oooh, oooh, the sky is the limit!" - The Tick
Goog places to start:http://www.visualbasicscript.com/m_24727/tm.htm
http://www.visualbasicscript.com/m_47117/tm.htm

(in reply to osk406)
 
 
Post #: 2
 
 RE: reading registry key string values in to an array - 7/27/2006 5:54:07 AM   
  osk406

 

Posts: 2
Score: 0
Joined: 7/27/2006
Status: offline
Thanks for the swift response :).

I was getting an error though
C:\Program Files\SAPIEN\PrimalScript Professional\Untitled1.vbs(38, 8) WshShell.RegRead: Invalid root in registry key "HKLM\SOFTWARE\ICL\Libra\Packages\PKG_0000178_A1"

i removed this: oWSH.RegRead("HKLM\" & strKeyPath & "\" & arrNames(i))
from this line  WScript.Echo arrNames(i) oWSH.RegRead("HKLM\" & strKeyPath & "\" & arrNames(i))

as it appeared to be qyerying the actual string value name  (that's the best way i can explain it, forgive me.)

any way, now it spits out the string value names perfect !!

That's sorted out my headache :)



Many thanks,
Osk

(in reply to ebgreen)
 
 
Post #: 3
 
 
 
  

If you found our site useful please link to us <a href="http://www.visualbasicscript.com">VisualBasicScript.com</a>.
All Forums >> [Scripting] >> WSH & Client Side VBScript >> reading registry key string values in to an array Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts