Solved

Command line utility to change computer name

Posted on 2003-11-13
10
1,260 Views
Last Modified: 2012-06-27
I want to change a windows 2000 computer name while running script. What command would I use.  This is before it joins a domain but after sysprep is ran.  

Thanks
John
0
Comment
Question by:jfrenzley
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
10 Comments
 
LVL 44

Accepted Solution

by:
CrazyOne earned 500 total points
ID: 9744122
This is for XP but it should work for Win2000
HOW TO: Use the Netdom.exe Utility to Rename a Computer in Windows XP
http://support.microsoft.com/default.aspx?scid=kb;en-us;Q298593&sd=tech
0
 
LVL 44

Expert Comment

by:CrazyOne
ID: 9744131
Never mind you have have install Netdom.exe before you can uses it
0
 
LVL 11

Expert Comment

by:adonis1976
ID: 9744405
0
Edgartown IT Case Study

Learn about Edgartown's quest to ensure the safety and security of the entire town's employee and citizen data. Read the case study!

 
LVL 2

Expert Comment

by:superfir
ID: 9744426
If you do not enter a value in the SYSPREP.INF file for the ComputerName in the [UserData] section, SYSPREP will allow you to enter the name of the system during the Minisetup wizard prior to the system being added to the domain if you have automated it during that portion of SYSPREP.

Refer to this article for more details:  http://www.microsoft.com/windows2000/techinfo/reskit/en-us/default.asp?url=/windows2000/techinfo/reskit/en-us/deploy/dggb_aut_cwrh.asp
0
 
LVL 2

Expert Comment

by:superfir
ID: 9744471
adonis - Unless the functionality you mention was included in one of the Win2K service packs the link you provided is only for XP/2K3.  Good info to have though.  =-)
0
 
LVL 48

Expert Comment

by:Mikal613
ID: 9744492
of course
Export the regkey in the same script, and then you can just change it with this value
for example HKEY\LOCAL..\Control\computername="%r%"

Else you just echo that info into a new file, that you name .reg and import afterwards


for example:
put part to create variable here:
randname.exe

then:
echo [REGEDIT4] >>newfile.reg
echo. >>newfile.reg
echo HKEY\LOCAL..\Control\computername="%r%" >>newfile.reg

and then regedit /S newfile.reg


0
 
LVL 15

Expert Comment

by:Rob Stone
ID: 9746848
as CO said, netdom does it. Its part of 2000 Resource CD.
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone 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

NTFS file system has been developed by Microsoft that is widely used by Windows NT operating system and its advanced versions. It is the mostly used over FAT file system as it provides superior features like reliability, security, storage, efficienc…
Invest in your employees with these five simple steps to improve employee engagement and retention.
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…
Suggested Courses

738 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