?
Solved

Command line utility to change computer name

Posted on 2003-11-13
10
Medium Priority
?
1,262 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 2000 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
Migrating Your Company's PCs

To keep pace with competitors, businesses must keep employees productive, and that means providing them with the latest technology. This document provides the tips and tricks you need to help you migrate an outdated PC fleet to new desktops, laptops, and tablets.

 
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 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

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…
The Summer 2017 Scholarship Winners have been announced!
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…
Suggested Courses

743 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