Solved

change workstation name on command line

Posted on 1998-09-22
11
339 Views
Last Modified: 2013-12-14
I want to change the name and ip-address of a nt4
workstation on the command line and then reboot it
from command line. Are there some tools to do this and
where can I get them?

(the same Q as pman but more points)
0
Comment
Question by:eklas
  • 5
  • 3
  • 2
  • +1
11 Comments
 
LVL 32

Expert Comment

by:jhance
ID: 1771019
0
 

Author Comment

by:eklas
ID: 1771020
Thanks for the tips. I tried netswitcher but unfortunately it didn't work.
It is possible to use the prg to change "host" and computername.
And you can use load/save/cmd line for host but *not* for
COMPUTERNAME :-(

/klas

0
 
LVL 3

Accepted Solution

by:
cbo120897 earned 200 total points
ID: 1771021
I have change the IP-Address (+ SubnetMask) with the following REG-script:

-----------------------------------------------------------
REGEDIT4

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\NETCARD\Parameters\Tcpip]
 "IPAddress"=hex(7):31,31,31,2e,32,32,32,2e,33,33,33,2e,34,34,34,00,00
"SubnetMask"=hex(7):32,35,35,2e,32,35,35,2e,32,35,35,2e,30,00,00
-----------------------------------------------------------
(5 lines !)

In this file, you must change the word NETCARD to your WS-Netcard. (Look in the registry under the Path HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services for the Netcard-Name - there you can also see your actuall IP-Address.)
Then you must change my IP-Adress (and SubnetMask) to yours.
In this file here you see IP:111.222.333.444 an Mask: 255.255.255.0
Please find out the correct syntax (If you want 123 then you must write 31,32,33 and the dot (.) is 2e and at the end 00,00)

Save this to a file (ip.reg) and load it unattend to the registry with the command: regedit.exe /s ip.reg.


To change the computername I think you can use the following REG-Script (i have not tested this):
-----------------------------------------------------------
REGEDIT4

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\ComputerName\ActiveComputerName]
"ComputerName"="new-name"

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\ComputerName\ComputerName]
"ComputerName"="new-name"

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters]
"Hostname"="new-name"
-----------------------------------------------------------
(10 lines!)

You must change the word new_name to your new Computername (+ Hostname?). Save this to a name.reg file and run: regedit /s name.reg.

After this 2 registry-changes, you must reboot your computer.
There are a lot of tools to do this unattend. If you don't find one, I can mail you one.

I hope this helps. Please test this 2 reg-scripts on a non-productive system, to see, if it works fine.

Sorry for my bad english :-)

Bye Christian
0
Portable, direct connect server access

The ATEN CV211 connects a laptop directly to any server allowing you instant access to perform data maintenance and local operations, for quick troubleshooting, updating, service and repair.

 

Author Comment

by:eklas
ID: 1771022
ok.
but please post a link to a simple, cheap tool here.
thanks.
/klas

0
 
LVL 3

Expert Comment

by:cbo120897
ID: 1771023
Try shutdown.exe from the NT resource kit - shutdown /r /l will reboot your system. I don't find a link to the Web.
Bye Christian
0
 

Author Comment

by:eklas
ID: 1771024
Do you have a name of a tool that can change the computername?
(even if you can't find a link?)
0
 
LVL 3

Expert Comment

by:cbo120897
ID: 1771025
No I hav'nt. But you can run my REG-Script in Batch-mode.

By Christian
0
 

Author Comment

by:eklas
ID: 1771026
I tried to 2 computer name variables in the registry
but it didn't work. the computer name was still the same.
if I search the registry the old name still appear on a
dozen places. guess that wasn't the right way to do it.

/klas

0
 
LVL 32

Expert Comment

by:jhance
ID: 1771027
You should have verified the answer's correctness before giving the credit.  
0
 

Author Comment

by:eklas
ID: 1771028
yes, I know :-)

I'll keep on searching. If you have any better solution than netswitcher I'll give
you 200pts as well.
I got a patched release of netswitcher that *can* change computername.
The problem now is that netswitcher also modifies a lot of other params.

/klas
0
 

Expert Comment

by:Sysmali
ID: 1771029
I use Ghostwalker from Symantec to change computer name in Dos (batch) mode. SID-numbers will also change.

Exuse my bad english,

//Marcus
0

Featured Post

Save the day with this special offer from ATEN!

Save 30% on the CV211 using promo code EXPERTS30 now through April 30th. The ATEN CV211 connects a laptop directly to any server allowing you instant access to perform data maintenance and local operations, for quick troubleshooting, updating, service and repair.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

While rebooting windows server 2003 server , it's showing "active directory rebuilding indices please wait" at startup. It took a little while for this process to complete and once we logged on not all the services were started so another reboot is …
No single Antivirus application (despite claims by manufacturers) will catch or protect you from all Virus / Malware or Spyware threats. That doesn't stop you from further protecting yourself however - and this article is to show you how.
Windows 8 comes with a dramatically different user interface known as Metro. Notably missing from the new interface is a Start button and Start Menu. Many users do not like it, much preferring the interface of earlier versions — Windows 7, Windows X…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

685 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question