Hello,

I wrote this code:

code:
 if @INWIN=2

goto "win9x"

else

goto "winnt"

endif



:win9x

if 0=exist("%windir%\ipchanged.tmp")

$bkey="HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services"

$NewIP="255.255.0.0"

$c=0

$Reboot = 0

$KeyN = enumkey("$bkey\Class\NetTrans\",$c)

while @error = 0
$ip = ReadValue($bkey+"\Class\NetTrans\$KeyN","IPMask")
if @error = 0 and $ip <> "255.255.0.0"
$ = writevalue($bkey+"\Class\NetTrans\$KeyN","IPMask",$newip,"REG_SZ")
$Reboot = 1
endif
$c = $c +1
$KeyN = enumkey($bkey+"\Class\NetTrans\",$c)
loop
if $Reboot = 1
shell "%comspec% /c echo changed ip from 255.255.255.0 to 255.255.0.0 > %windir%\ipchanged.tmp"
? "System needs to be restarted to establish new settings."
? ? " Press any key to proceed..." get $
run "%windir%\RUNDLL32.EXE user.exe,ExitWindows" exit
else
shell "%comspec% /c echo no changes done > %windir%\ipchanged.tmp"
endif
endif



:winnt

MISSING PART

to change subnetmask both on Win9X & WinNT
First part works perfectly, it is thanks to you. [Smile] [Smile]

But i don't know how to make change on Winnt stations (NT4sp6a & NT5) , users are admin on local.

if you have ideas, I listen to you [Big Grin]

Thank you to understand poor debutant [Frown]