Les – Thank You! And to the rest of you Thanks!

I ended up not needing the ArrayEnumValue function do to the fact that some of the Systems don’t have the MTU setting configured.

Here is the code..


Code:

Break On
Dim $BaseKey, $Key, $RC, $MTUvalue

; Edit MTU value below.

$MTUvalue = '1400'
$BaseKey = 'HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\Interfaces'


For each $Key in ArrayEnumKey($BaseKey)
$RC = WriteValue($BaseKey+'\'+$Key,'MTU', $MTUvalue ,'REG_DWORD')
Next



;UDF Functions Do Not Edit!
;UDF Function ArrayEnumKey

function arrayenumkey($regsubkey)
dim $retcode, $subkeycounter, $currentsubkey, $subkeyarray

if not keyexist($regsubkey)
$arrayenumkey=''
return
endif

$subkeycounter=0
do
$currentsubkey=enumkey($regsubkey,$subkeycounter)
if $currentsubkey<>259 and @ERROR=0
redim preserve $subkeyarray[$subkeycounter]
$subkeyarray[$subkeycounter]=$currentsubkey
$subkeycounter=$subkeycounter+1
endif
until $currentsubkey=259 or @ERROR

$arrayenumkey=$subkeyarray
endfunction

;End UDF Functions.