Solved

change workstation name on command line

Posted on 1998-09-22
11
333 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
Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 

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

Wish Marketing would stop bothering you?

Is your marketing department constantly asking for new email signature updates? Are they requesting a different design for every department? Do they need yet another banner added? Don’t let it get you down! There is an easy way to manage all of these requests...

Join & Write a Comment

Suggested Solutions

Our Group Policy work started with Small Business Server in 2000. Microsoft gave us an excellent OU and GPO model in subsequent SBS editions that utilized WMI filters, OU linking, and VBS scripts. These are some of experiences plus our spending a lo…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
This Micro Tutorial will give you a basic overview of Windows DVD Burner through its features and interface. This will be demonstrated using Windows 7 operating system.
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…

708 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

16 Experts available now in Live!

Get 1:1 Help Now