#57155 - 2001-07-11 10:29 PM
Changing Windows 98 "Computer Names"
|
Anonymous
Anonymous
Unregistered
|
I need to change the computer names on ALL windows 98 machines. In my script I have a command to write the names to an INI file WriteProfileString "P:\Computernames\mac.ini","@wksta","Macaddress","@address") Is it possible to change the computer names with one script with some pointers to the new name. I have 300 machines and I'm trying to get this as simple as possible.
|
|
Top
|
|
|
|
#57156 - 2001-07-11 10:58 PM
Re: Changing Windows 98 "Computer Names"
|
bleonard
Seasoned Scripter
   
Registered: 2001-01-19
Posts: 581
Loc: Chicago, IL
|
Smartin - I've not tried, but believe the value stored in "HKEY_LOCAL_MACHINE\System\CurrentControlSet\control\ComputerName\ComputerName", "ComputerName", "REG_SZ".Also, if running Ethernet check "HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\VxD\MSTCP", "HostName", "REG_SZ". and "HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\VxD\VNetSup", "ComputerName", "REG_SZ" to synchronize system name with DNS values. You may need to explore any possible issues with locally shared drives and/or printers before implementing. Perhaps someone who has implemented can provide further guidance. Bill
|
|
Top
|
|
|
|
#57157 - 2001-07-11 11:14 PM
Re: Changing Windows 98 "Computer Names"
|
Anonymous
Anonymous
Unregistered
|
Can you give an example of what a machine name is now and what you want to change it to?
|
|
Top
|
|
|
|
#57158 - 2001-07-11 11:21 PM
Re: Changing Windows 98 "Computer Names"
|
Anonymous
Anonymous
Unregistered
|
We are changing the Windows NT naming convention for all of our users from gop_smartin to smartin and need to change all computer names to reflect the change.
|
|
Top
|
|
|
|
#57159 - 2001-07-11 11:30 PM
Re: Changing Windows 98 "Computer Names"
|
Anonymous
Anonymous
Unregistered
|
So is there a set number of characters that you want cut off the beginning? If that's the case, it should be real easy.
|
|
Top
|
|
|
|
#57160 - 2001-07-11 11:38 PM
Re: Changing Windows 98 "Computer Names"
|
Anonymous
Anonymous
Unregistered
|
I wish it was that easy, unfortunately before I got here they would put nick names, pet names.
|
|
Top
|
|
|
|
#57161 - 2001-07-12 12:45 AM
Re: Changing Windows 98 "Computer Names"
|
Anonymous
Anonymous
Unregistered
|
smartin, How soon would you want to do this? And for how many people would you like to implement it for? A couple year's back I created a software application to write specifically the "computername" to a PC. I wrote a VB app to look at the LOGIN_NAME field from the registry and apply it to the correct "HKEY" value. Are you looking at changing the PC name to their login name or something else?
|
|
Top
|
|
|
|
#57163 - 2001-07-12 05:01 AM
Re: Changing Windows 98 "Computer Names"
|
MCA
KiX Supporter
   
Registered: 2000-04-28
Posts: 5152
Loc: Netherlands, EU
|
|
|
Top
|
|
|
|
#57165 - 2001-07-12 02:48 PM
Re: Changing Windows 98 "Computer Names"
|
Anonymous
Anonymous
Unregistered
|
I have close to 150 PC's that need to have the computernames changed. I have already changed they ID's to the current format as well as the users home drives.This is the last step that I have to do and don't want to visit each workstation.
|
|
Top
|
|
|
|
#57166 - 2001-07-12 04:20 PM
Re: Changing Windows 98 "Computer Names"
|
Anonymous
Anonymous
Unregistered
|
If it doesn't matter what machine gets what name, just make a list of names in an INI file like this:[Workstations] WKSTA001=0 WKSTA002=0 WKSTA003=0 WKSTA004=0 The script should first check if it's name has been changed yet. It should check HKLM\Software\YourCompany'sName\NameChangeScript and whatever value. Something like "Changed" should be equal to 1. If it is, then the script quits, otherwise, it runs thought the INI file with READPROFILESTRING until it finds an entry with a 0. It should instantly update that entry to 1, and then save the name in the registry. Then it should go about the procedure of changing the machine name, and finally update its registry indicating that its name has indeed been changed via script. -Steve O
|
|
Top
|
|
|
|
#57167 - 2001-07-12 04:30 PM
Re: Changing Windows 98 "Computer Names"
|
Anonymous
Anonymous
Unregistered
|
The Computernames will be the same as the logon ID
|
|
Top
|
|
|
|
#57168 - 2001-07-12 07:20 PM
Re: Changing Windows 98 "Computer Names"
|
bleonard
Seasoned Scripter
   
Registered: 2001-01-19
Posts: 581
Loc: Chicago, IL
|
smartin - To recap, you have no cross-reference between current machine names and new names, correct? And new names are to be user login id?Perhaps you use a message box asking the end-user if logged into their pc or someone elses, and depend upon end-users to help out here. If user responds 'Yes', begin rename process and write check file at end. If 'No,' bypass and perhaps send admin alert. Have a check file named <userid.txt> so end-user can not update more than one machine. Include old name, MAC and IP address, date/time etc. Then, watch rename process over a few days, contact users logging into the machines that do not get properly updated (info in the DC security event log). Can also check board for process to limit user login to single machine at a time to help control multiple logins during this name change. Not the most elegant method, but will take care of the vast majority of your systems and leave you with only a few troublesome ones to correct. Bill
|
|
Top
|
|
|
|
Moderator: Glenn Barnas, NTDOC, Arend_, Jochen, Radimus, Allen, ShaneEP, Ruud van Velsen, Mart
|
0 registered
and 847 anonymous users online.
|
|
|