Solved

change workstation name on command line

Posted on 1998-09-22
11
335 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
 

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
Want to promote your upcoming event?

Are you going to an event? Are you going to be exhibiting at a tradeshow? Talking at a conference? Using a promotional banner in your email signature ensures that your organization’s most important contacts stay in the know and can potentially spread the word about the event.

 

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Storage devices are generally used to save the data or sometime transfer the data from one computer system to another system. However, sometimes user accidentally erased their important data from the Storage devices. Users have to know how data reco…
Join Greg Farro and Ethan Banks from Packet Pushers (http://packetpushers.net/podcast/podcasts/pq-show-93-smart-network-monitoring-paessler-sponsored/) and Greg Ross from Paessler (https://www.paessler.com/prtg) for a discussion about smart network …
This video Micro Tutorial explains how to clone a hard drive using a commercial software product for Windows systems called Casper from Future Systems Solutions (FSS). Cloning makes an exact, complete copy of one hard disk drive (HDD) onto another d…
With the advent of Windows 10, Microsoft is pushing a Get Windows 10 icon into the notification area (system tray) of qualifying computers. There are many reasons for wanting to remove this icon. This two-part Experts Exchange video Micro Tutorial s…

867 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

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now