Change Nic Speed in registry

Need some help changing the speed and duplex settings on several machines. All of the machines have Intel nics in them and I have identified them with this relevance by the registry value

(if (name of operating system starts with “Win”) then((values “*SpeedDuplex” of it) of keys whose (exists value “DriverDesc” whose (it as string contains “Intel” of it) of it) of key “HKLM\SYSTEM\CurrentControlSet\Control\Class{4d36e972-e325-11ce-bfc1-08002be10318}” of native registry) else (nothing))

Here is my dilemma, I can not change the value because keys vary amongst different machines. See below

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Class{4d36e972-e325-11ce-bfc1-08002be10318}\0001
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Class{4d36e972-e325-11ce-bfc1-08002be10318}\0007
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Class{4d36e972-e325-11ce-bfc1-08002be10318}\0005
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Class{4d36e972-e325-11ce-bfc1-08002be10318}\0003

Is there any relevance that will target the correct key? Finding it was not a problem but I’m not sure how to change it since it will vary amongst different machines.

jlpeppers, how did you decide on that particular GUID? it does not exist on my test machine…

q: key “HKLM\SYSTEM\CurrentControlSet\Control\Class{4d36e972-e325-11ce-bfc1-08002be10318}” of native registry
E: Singular expression refers to nonexistent object.

OH, missing a slash in there… (weird that I had to escape the \{ with \\{ to get it to show up correctly in this forum. )

q: keys whose (exists value “DriverDesc” whose (it as string contains “Intel” of it) of it) of key “HKLM\SYSTEM\CurrentControlSet\Control\Class\{4d36e972-e325-11ce-bfc1-08002be10318}” of native registry
A: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Class{4d36e972-e325-11ce-bfc1-08002be10318}\0007
A: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Class{4d36e972-e325-11ce-bfc1-08002be10318}\0011

It appears you might have to deal with more than one entry on a single machine. Multiples in relevance substitution requires use of a dynamically generated .bat file See this post for the technique of using a batch file:

I’m only looking at the keys that only have Intel which eliminates all the other values and give me the one I want. Based off of that, how can I change the registry key with one statement that will work universally across multiple machines since each machines registry key will be different.

You almost have it there with your query:

I haven’t tested this, so use with care, but I think your Action script will be something like

action uses wow64 redirection false
delete __appendfile
// Note the doubled close-bracket inside the relevance substitution; that escapes the close-bracket character.

appendfile {concatenation "%0d%0a" of ("reg.exe add %22" & it & "%22 /v %22name-of-value-that-sets-duplex%22 /t REG_DWORD /d value-that-sets-the-duplex-you-want /F) of pathnames of keys whose (exists value "DriverDesc" whose (it as string contains "Intel" of it) of it) of key "HKLM\SYSTEM\CurrentControlSet\Control\Class\{4d36e972-e325-11ce-bfc1-08002be10318}}" of native registry}
delete set-duplex.cmd
move __appendfile set-duplex.cmd
waithidden cmd /c set-duplex.cmd