Jump to content
xisto Community
DjCalvin

VBScript: Help, Looping Through Registry Keys not sure exactly how to loop through subkeys till i find a string.

Recommended Posts

I have been assigning nic speeds for a couple years on all new boxesthat we build in our datacenters manually. I finally got fed up andpicked up some vbscript books which have been a great help managingsome 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 valueranging from 0+100/full is 4 auto/auto is 0If the device is not a physical hardware nic, it will not have theSpeedDuplex Key, which is a plus for finding real devices vsvirtual/software ones.What I am trying to do is run through each subkey and its strings andchange 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

Share this post


Link to post
Share on other sites

Calvin - I dunno much about using VBScript, but you might want to take a look at this site:
https://www.daniweb.com/programming/software-development/threads/20678/i-want-to-manipulate-the-registry-key-values-through-a-vb-net-application

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

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.