Jump to content



Welcome to AstaHost - Dear Guest , Please Register here to get Your own website. - Ask a Question / Express Opinion / Reply w/o Sign-Up!
Photo
- - - - -

VBScript: Help, Looping Through Registry Keys


1 reply to this topic

#1 DjCalvin

DjCalvin

    Member [ Level 1 ]

  • Members
  • 35 posts
  • Location:Boston, MA USA

Posted 10 May 2006 - 02:24 PM

I have been assigning nic speeds for a couple years on all new boxes
that we build in our datacenters manually. I finally got fed up and
picked up some vbscript books which have been a great help managing
some redunant tasks i must do, but this one stumps me.

Key Name:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Class\{4D36E972-E325-11CE-BFC1-08002bE10318}

Under each subkey there is a string value of "SpeedDuplex" with a value
ranging from 0+
100/full is 4 auto/auto is 0

If the device is not a physical hardware nic, it will not have the
SpeedDuplex Key, which is a plus for finding real devices vs
virtual/software ones.

What I am trying to do is run through each subkey and its strings and
change any that have a string of "SpeedDuplex" with a value of 0 to 4.

Im not sure about how to loop through all the keys to do this.

Any help would be appreciated.

Thx

#2 miCRoSCoPiC^eaRthLinG

miCRoSCoPiC^eaRthLinG

    PsYcheDeLiC dR3aMeR

  • [MODERATOR]
  • 2,248 posts
  • Gender:Male
  • Location:Bangkok, Thailand
  • Interests:Photography, Magic Tricks, Numismatics & Philately to some extent, Being a nuisance in general (that's my favourite)
  • myCENTs:NEGATIVE[-21.50]

Posted 10 May 2006 - 02:42 PM

Calvin - I dunno much about using VBScript, but you might want to take a look at this site:
http://www.daniweb.c...hread20678.html

This has code samples and describes how to loop through a bunch of values under a particular registry key. This might help you come up with a routine that does your job..

Regards,
m^e



Reply to this topic



  


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users