I had to alter the HOST name on all machines to = the asset sticker on the PC. I was going to have to use PoleEdit to remove the system policy so I could get to control panel/ networking until...; sus out the host name
$hostname = ReadValue( "HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\Tcpip\Parameters" , "Hostname" )
$Selection = MessageBox( "Does the above hostname match the [barcoded] Asset Sticker on your PC?"," the hostname of this workstation is: $hostname", 36 )
If $Selection <> 6 goto no endif
goto done
:no
? "Lets fix it...."
color g+/n
? "Please enter the asset number for this PC: "
color w+/n
? gets $hostname
if $hostname = ""
goto no
else
writevalue( "HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\Tcpip\Parameters" , "Hostname" ,
"$hostname" , "REG_SZ" )
:done
? "fixed, the HOST name is now: " $hostname
TO find the registry key I enterd "bart" as a host name, searched for "bart" and exported the key...
I later extened this script to write to the INI file, it also required the host name...
WRITEPROFILESTRING ("c:\sbs\config\conlive\confirm.ini" ,"client" ,"station" ,"$hostname")
contact johnhb@paradise.net.nz