Hello everyone.

I made up this script, and it is working fine with Windows 98, 2000 and XP, but it seems not work in windows nt 4.0.

I get this error message: select IPAddress from Win32_NetworkAdapterConfiguration where IPEnabled=TRUE
6The handle is invalid.

The script is following:

===================================
$survey = 01
$memoria = memorysize() + 1

$IpSet = GetObject("winmgmts:").ExecQuery("select IPAddress from Win32_NetworkAdapterConfiguration where IPEnabled=TRUE")

If @error <> 0
? @error + " / " @serror
else
For Each $IPConfig In $IPSet
$IP = $IPConfig.IPAddress(0)
IF Open( 3 , "\\spohs01\viruslog\controle.txt" , 5 ) = 0
$x = WriteLine(3 , "IP" + "," + $survey + "," + @WKSTA + "," + @LDOMAIN + "," + @USERID + "," + @MDAYNO + "," + @MONTHNO + "," + @YEAR + "," + $IP + "," + Chr(13) + Chr(10))
endif

Next
EndIf

exit 1
====================================
Does anyone have a clue? Its the same login script for all users, but it really doesnt work for windows nt 4.0

Thank you alll
Best Regards

Deniz Feital
_________________________
Deniz Feital