Solved

Command line utility to change computer name

Posted on 2003-11-13
10
1,255 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
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
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 
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

Get up to 2TB FREE CLOUD per backup license!

An exclusive Black Friday offer just for Expert Exchange audience! Buy any of our top-rated backup solutions & get up to 2TB free cloud per system! Perform local & cloud backup in the same step, and restore instantly—anytime, anywhere. Grab this deal now before it disappears!

Join & Write a Comment

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…
This article explains how to prepare an HTML email signature template file containing dynamic placeholders for users' Azure AD data. Furthermore, it explains how to use this file to remotely set up a department-wide email signature policy in Office …
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

705 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

18 Experts available now in Live!

Get 1:1 Help Now