Solved

change workstation name on command line

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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Recently Microsoft released a brand new function called CONCAT. It's supposed to replace its predecessor CONCATENATE. But how does it work? And what's new? In this article, we take a closer look at all of this - we even included an exercise file for…
A Bare Metal Image backup allows for the restore of an entire system to a similar or dissimilar hardware. They are highly useful for migrations and disaster recovery. Bare Metal Image backups support Full and Incremental backups. Differential backup…
In this video, we discuss why the need for additional vertical screen space has become more important in recent years, namely, due to the transition in the marketplace of 4x3 computer screens to 16x9 and 16x10 screens (so-called widescreen format). …
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.

839 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