#1646 - 2000-02-11 04:45 PM
change host name in tcp/ip properties win9x
|
Anonymous
Anonymous
Unregistered
|
I got kixtart working for a test user today, piece of cake! Is it possible to change a machine's host name? I noticed there is a "hostname" macro, but it seems to only read the info, not write to it/change it. Another method would be to write a new hostname straight into the registry, correct? I'm wondering if I can write to the registry using a variable, such as @userid? I'm thinking of doing something similar to the method suggested under the thread "change computer name with kix." Here it is, except I would use the part of the registry that contains the dns stuff, and I would LOVE to be able to set the hostname value the same as the user name. Is there any way to do this?
|
|
Top
|
|
|
|
#1647 - 2000-02-13 11:31 AM
Re: change host name in tcp/ip properties win9x
|
Anonymous
Anonymous
Unregistered
|
Under W9x the following should work (without fancy)$Key = "HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\VxD\MSTCP\" writevalue ($Key,"hostname",@USERID,"REG_SZ")
|
|
Top
|
|
|
|
#1649 - 2000-02-14 11:21 AM
Re: change host name in tcp/ip properties win9x
|
Anonymous
Anonymous
Unregistered
|
This is not the same. Computername refers to the computername under basic Networking meanwhile Hostname is under the DNS section. Though you asked to restart the computer after you change this field (by click and fill) this field is immediately in effect without restarting the computer. So changing it from the script will work immediately. I also can't imagine, why it is good though I have some tips...
|
|
Top
|
|
|
|
#1651 - 2000-02-15 10:19 AM
Re: change host name in tcp/ip properties win9x
|
Anonymous
Anonymous
Unregistered
|
I emailed the advice to a coworker and he got it working! We are concerned about changing more than one machine to the same hostname, currently our only solution is allow one login per user at at time. There are only a handful of users who have notebooks AND desktops, we figured we could sort that out later.Basically, we have a network management tool (DMI from compaq) that allows us to remotely administer client machines, but a lot of the hostnames were not descriptive enough for us to really use it (no one had paid much attention to hostnames because there was no reason to). It does not use netbios names (machine names).
|
|
Top
|
|
|
|
#1652 - 2000-03-07 02:51 PM
Re: change host name in tcp/ip properties win9x
|
Anonymous
Anonymous
Unregistered
|
I'm trying to write a script to change IP cfg settings on all our workstations. All references to DNS and IP related info I have seen points to the MSTCP key as indicated previously. Problem is, I'm staring at a Win95 PC, currenlty on the network, that has only five entries under MSTCP: EnableDNS, Lanabase, LMHostFile, LocalCopyMade, ScopeID; plus two subkeys: Parameters and ServiceProviderAll IP specific info is at HKLM\System\CurrentContolSet\Services\Class\Netrans\000n. DefaultGateway, IPAddress, IPMask, NameServer1, NameServer2, and NodeType are all here. So, any ideas? Should I just create the settings? ------------------ My opinions are my own -- assuming I have any...
|
|
Top
|
|
|
|
#1653 - 2000-03-07 03:31 PM
Re: change host name in tcp/ip properties win9x
|
Anonymous
Anonymous
Unregistered
|
Todd, do you have dhcp server running (on nt server)? Maybe that would be better? We actually used kixtart to nuke manually entered dns servers so dhcp could push down current/correct ones. I'm curious...If you use more than one client/protocol, be careful, those 000n's are created pretty much randomly when you add/update a protocol or client (I've seen up to 5 or 6, skipping numbers, whatever). You might want to nuke everything under nettrans and replace it with a standardized configuration, so your script can find what it's looking for under nettrans/0001 etc. You might want to set up a machine as dhpc client and check the registry, and then set it up with everything typed in manually, and compare the resulting registries. Then you'll know exactly where to put what you want.
|
|
Top
|
|
|
|
#1654 - 2000-03-09 11:49 AM
Re: change host name in tcp/ip properties win9x
|
Anonymous
Anonymous
Unregistered
|
My apologies for not providing "full disclosure." The PC I am looking at is actually a portable. It has a Xircom NIC/Modem combination card. DHCP is only used for RAS connectivity and that is controlled by another organization. They use DHCP, but we still have to enter DNS and WINS values manually -- don't ask. Have not checked a DT PC with Win95. Didn't think that would change where these values were entered into the registry, but will check. Only using TCP/IP. Noticed 000n's were random. Figured I'd have script enum the registry, then check something like, HKLM\System\CurrentControlSet\Services\Class\Net\000n, "DriverDesc" for "Dial-Up Adapter". If Dial-Up adapter, it get's one set of IPcfg values. If not, another set. Guess I can use same technique to see where IP values are located. If I find them under MSTCP, I'll update those. If I find them elsewhere, will update elsewhere. Any and all suggestions are appreciated. ------------------ My opinions are my own -- assuming I have any...
|
|
Top
|
|
|
|
#1655 - 2000-03-09 04:43 PM
Re: change host name in tcp/ip properties win9x
|
Anonymous
Anonymous
Unregistered
|
Results of additional research...Apparently our W95 DT PCs put NIC DNS, Domain, and WINS Information in the MSTCP location. The IP, Mask, and Default Gateway in the NetTrans\000n location. The laptop I have with a Xircom modem/NIC combo PC-Card, puts info in HKLM\SYSTEM\CurrentControlSet\Enum\Root, "Net", that apparently identified Dial-UP adapters and includes the correct Net\000n as "Driver". The DT PC didn't have this entry. IP, WINS, Mask, and Default Gateway are all stored under NetTrans\000n (which may not be the same 000n as used Net\000n). Unfortunately, I haven't found a way of correlating the proper Net\000n to NetTrans\000n. Still looking... ------------------ My opinions are my own -- assuming I have any...
|
|
Top
|
|
|
|
#1656 - 2000-03-09 05:05 PM
Re: change host name in tcp/ip properties win9x
|
Anonymous
Anonymous
Unregistered
|
Found it! HKLM\Enum\Root\Net\000n\Bindings points to the HKLM\Enum\Network\MSTCP\000n key which has a value string, "Driver" which points to the appropriate HKLM\System\CurrentControlSet\Services\Class\NetTrans\000n where the IPcfg values are stored for Dial-Up Adapters. I guess I can use a process of elimination to identify the "NIC" entries. ------------------ My opinions are my own -- assuming I have any...
|
|
Top
|
|
|
|
#1657 - 2000-03-10 04:21 AM
Re: change host name in tcp/ip properties win9x
|
test_user
Fresh Scripter
Registered: 2000-02-29
Posts: 14
|
This might work:If $winver=2 $TempString = READVALUE("HKEY_LOCAL_MACHINE\Enum\Network\MSTCP\0000", "Driver") $Mask = READVALUE("HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Class\$TempString", "IPMask") Else $TempNumber = READVALUE("HKEY_LOCAL_MACHINE\SYSTEM\Select", "Current") $TempString = "ControlSet00"+$TempNumber $NetCard = ENUMKEY("HKEY_LOCAL_MACHINE\SYSTEM\$TempString\Services\NetBT\Adapters",0) $Mask = READVALUE("HKEY_LOCAL_MACHINE\SYSTEM\$TempString\Services\$NetCard\Parameters\Tcpip", "SubnetMask") $Dhcp = READVALUE("HKEY_LOCAL_MACHINE\SYSTEM\$TempString\Services\$NetCard\Parameters\Tcpip", "EnableDHCP") Endif
|
|
Top
|
|
|
|
Moderator: Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart
|
0 registered
and 1471 anonymous users online.
|
|
|