Solved

change workstation name on command line

Posted on 1998-09-22
11
336 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
Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

 

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

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

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

Suggested Solutions

If you get continual lockouts after changing your Active Directory password, there are several possible reasons.  Two of the most common are using other devices to access your email and stored passwords in the credential manager of windows.
How to record audio from input sources to your PC – connected devices, connected preamp to record vinyl discs, streaming media, that play through your audio card: Vista, Windows 7, Windows 8, Windows 8.1 and Windows 10 – both 32 bit & 64.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Windows 10 is mostly good. However the one thing that annoys me is how many clicks you have to do to dial a VPN connection. You have to go to settings from the start menu, (2 clicks), Network and Internet (1 click), Click VPN (another click) then fi…

816 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

10 Experts available now in Live!

Get 1:1 Help Now