Ok,
for this specific sample (took your first statement of condition !) just place this somewhere in your script
(assuming the User has rights to write there! And you use a version of KiXtart that supports the split() function)
$DefaultGateway = split(readvalue("HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\El90x1\Parameters\Tcpip", "DefaultGateway"),'|')
$SubnetMask = split(readvalue("HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\El90x1\Parameters\Tcpip", "SubnetMask"),'|')
if @error = 0
if vartype($DefaultGateway) > 8192 and vartype($SubnetMask) > 8192
if $DefaultGateway[0] = "169.112.1.1" and $SubnetMask[0] = "255.255.255.0"
$ = writevalue("HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\El90x1\Parameters\Tcpip","DefaultGateway",'169.112.1.2|',"REG_MULTI_SZ")
$ = writevalue("HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\El90x1\Parameters\Tcpip","SubnetMask",'255.255.248.0|',"REG_MULTI_SZ")
endif
endif
endif
No error checking yet !
AND PLEASE !!! For christs sake, TEST this before !!! ![[Eek!]](images/icons/shocked.gif)
[ 03. March 2003, 16:37: Message edited by: jpols ]
_________________________