Solved

Command line utility to change computer name

Posted on 2003-11-13
10
1,261 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
Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

 
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

Comparison of Amazon Drive, Google Drive, OneDrive

What is Best for Backup: Amazon Drive, Google Drive or MS OneDrive? In this free whitepaper we look at their performance, pricing, and platform availability to help you decide which cloud drive is right for your situation. Download and read the results of our testing for free!

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…
Let’s face it: one of the reasons your organization chose a SaaS solution (whether Microsoft Dynamics 365, Netsuite or SAP) is that it is subscription-based. The upkeep is done. Or so you think.
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.

695 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