If @INWIN <> 2 ? "CompName.kix, Version 1.01 for Windows 9x" ? "Adjust ComputerName and HostName" ? ? "Usage: KIX32 COMPNAME $NewName=new_computer_name" ? ? "Written by Rob van der Woude" ? "http://www.robvanderwoude.com" ? EXIT 1 EndIf If InStr( "$NewName", "?" ) > 0 $NewName = "" EndIf While $NewName = "" ? "Enter the new computer name: " GetS $NewName If InStr( "$NewName", "?" ) > 0 $NewName = "" EndIf Loop EXIT ? "ComputerName:" $OldVal = ReadValue( "HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\ComputerName\ComputerName", "ComputerName" ) ? "Old value = $OldVal" If @ERROR = 0 $RC = WriteValue( "HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\ComputerName\ComputerName", "ComputerName", $NewName, "REG_SZ" ) If @ERROR = 0 $NewVal = ReadValue( "HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\ComputerName\ComputerName", "ComputerName" ) ? "New value = $NewVal" Else ? "Error writing " + Chr(34) + "HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\ComputerName\ComputerName" + Chr(34) EndIf EndIf ? "NetBIOS name:" $OldVal = ReadValue( "HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\VxD\VNETSUP", "ComputerName" ) ? "Old value = $OldVal" If @ERROR = 0 $RC = WriteValue( "HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\VxD\VNETSUP", "ComputerName", $NewName, "REG_SZ" ) If @ERROR = 0 $NewVal = ReadValue( "HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\VxD\VNETSUP", "ComputerName" ) ? "New value = $NewVal" Else ? "Error writing " + Chr(34) + "HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\VxD\VNETSUP" + Chr(34) EndIf EndIf ? "TCP/IP host name:" $OldVal = ReadValue( "HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\VxD\MSTCP", "HostName" ) ? "Old value = $OldVal" If @ERROR = 0 $RC = WriteValue( "HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\VxD\MSTCP", "HostName", $NewName, "REG_SZ" ) If @ERROR = 0 $NewVal = ReadValue( "HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\VxD\MSTCP", "HostName" ) ? "New value = $NewVal" Else ? "Error writing " + Chr(34) + "HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\VxD\MSTCP" + Chr(34) EndIf EndIf ?