So Im pretty much a scripting/programming know-nothing. I've done some really, really simplistic bat files before, and I need something slightly less simplistic for a task at work, but Im not sure how I can make it work (or if it's doable in a bat file or what not)
The task: we have several models of workstations running windows xp pro and I want to be able to check the speed/duplex settings remotely. Windows doesnt really support that, however, the drivers we use set a value in a registry key to determine the speed/duplex config of the nic.
for example, 3 models use a broadcom nic/driver that sets the speed via the following key:
I can drop scripts, reg keys, whatever on machines and remotely access them via a cli console (thank you, dameware). Id like a script that can check for one of 4 keys (each driver puts the key in a different place), report the value, and if the value isnt 0 (which is auto negotiate) set it to zero, or just run a trimmed-down .reg key that will replace the value with what I want.
I can check for a key with this command:
It returns:
If reg_sz is set to anything other than zero I want it to change it to zero, or run a reg key I have which does the same thing. Is there a way to do this with a bat file? I know thats a pretty simplistic way of wanting to handle it, but Im not going to get someone here to distribute a registry change like this via group policy or our app distribution system. I'm an intern tasked with some monkey work...and I really hate doing things that way.
Worst case I can run the query on each machine and see the output, then run the reg key manually, but if I could have it automated that would be sweet. Im looking at having to do this to hundreds of machines so Id like to save as much time as possible, but this is something that really isnt my area :-/
Otherwise I have to wait to get the machines idle where I can remote them and check/change the settings manually, which is tedious and time-consuming. This may not even be a great way to do this, but the tools and options are there so it seemed like it was worth looking into.
any help, pointers, useful documentation etc appreciated.
Thanks
/if i knew what i was doing this would probably be some simple if/then/else kind of thing. but...i dont really know what im doing
The task: we have several models of workstations running windows xp pro and I want to be able to check the speed/duplex settings remotely. Windows doesnt really support that, however, the drivers we use set a value in a registry key to determine the speed/duplex config of the nic.
for example, 3 models use a broadcom nic/driver that sets the speed via the following key:
Code:
HKEY_LOCAL_MACHINE\system\currentcontrolset\control\class\{4d36e972-e325-11ce-bfc1-08002be10318}\0001\RequestedMediaType REG_SZ 0
I can drop scripts, reg keys, whatever on machines and remotely access them via a cli console (thank you, dameware). Id like a script that can check for one of 4 keys (each driver puts the key in a different place), report the value, and if the value isnt 0 (which is auto negotiate) set it to zero, or just run a trimmed-down .reg key that will replace the value with what I want.
I can check for a key with this command:
Code:
reg query hklm\system\currentcontrolset\control\class\{4d36e972-e325-11ce-bfc1-08002be10318}\0001\ /v RequestedMediaType
It returns:
Code:
! REG.EXE VERSION 3.0
HKEY_LOCAL_MACHINE\system\currentcontrolset\control\class\{4d36e972-e325-11ce-bfc1-08002be10318}\0001\
RequestedMediaType REG_SZ 0
If reg_sz is set to anything other than zero I want it to change it to zero, or run a reg key I have which does the same thing. Is there a way to do this with a bat file? I know thats a pretty simplistic way of wanting to handle it, but Im not going to get someone here to distribute a registry change like this via group policy or our app distribution system. I'm an intern tasked with some monkey work...and I really hate doing things that way.
Worst case I can run the query on each machine and see the output, then run the reg key manually, but if I could have it automated that would be sweet. Im looking at having to do this to hundreds of machines so Id like to save as much time as possible, but this is something that really isnt my area :-/
Otherwise I have to wait to get the machines idle where I can remote them and check/change the settings manually, which is tedious and time-consuming. This may not even be a great way to do this, but the tools and options are there so it seemed like it was worth looking into.
any help, pointers, useful documentation etc appreciated.
Thanks
/if i knew what i was doing this would probably be some simple if/then/else kind of thing. but...i dont really know what im doing