#63152 - 2002-02-15 04:35 PM
Rename Workstation
|
gdalinis
Fresh Scripter
Registered: 1999-12-07
Posts: 27
|
Hi All,I was working on a script to rename the workstation name. I have a ghost image (trying to get rid of it) and autologon when first boots and runs the following script: ;writevalue("HKEY_CURRENT_USER\Volatile Environment","LOGONSERVER","\\$compname","REG_SZ") ;writevalue("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon","DefaultDomainName","$compname","REG_SZ") ;writevalue("HKLM\SYSTEM\CurrentControlSet\Control\ComputerName\ActiveComputerName","ComputerName","$compname","REG_SZ") ;writevalue("HKLM\SYSTEM\CurrentControlSet\Control\ComputerName\ComputerName","ComputerName","$compname","REG_SZ") ;writevalue("HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters","Hostname","$compname","REG_SZ") ;addkey("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Ncpa\CurrentVersion\ConfigChanged") The beginning of each line begins with a ; so if it wraps, sorry. I don't know how to make it smaller. Anyways, in the beginning of the script, it prompts for $compname and after the input is recieved, it runs through and does the renames. After its done, it reboots and I have another script run that joins it to the domain. After its done it reboots again and gives the login screen. Well, when I do this and try to login to the domain, I get a trust error. If I run script, reboot, and manually join to the domain I get the same problem so its somewhere in renaming the workstation. I looked at previous postings and couldn't find anything that wasn't free. Can anybody help? I hope I explained as detailed as possible. Thanks in Advanced.
_________________________
Gus Dalinis
Systems Analyst
|
Top
|
|
|
|
#63153 - 2002-02-16 12:11 AM
Re: Rename Workstation
|
Anonymous
Anonymous
Unregistered
|
have a look here : http://www.swynk.com/winscript/SCRIPT_RenameWorkstationVBS.asp"netdom.exe" from w2k resource kit is really powerful. It can perform tasks like join/remove from domain, or query active directory for servers and workstations on an eye blink. The above script is based on that. ps1.You have change ths sid or you have run the sysprep, haven't you ? ps2. Are you from Greece ? [ 16 February 2002: Message edited by: novastar ]
|
Top
|
|
|
|
#63158 - 2004-02-28 05:17 PM
Re: Rename Workstation
|
pvds
Hey THIS is FUN
Registered: 2001-04-14
Posts: 201
|
Maby you can take a look here? NewSID
|
Top
|
|
|
|
#63160 - 2004-03-03 07:17 AM
Re: Rename Workstation
|
Walshie
Lurker
Registered: 2004-03-03
Posts: 3
|
I have written an application in C# to rename a computer name, i do the same thing as you, have autologon, but after ghosting i use ghstwalk from symantec, i script that into the ghost process, after that finished machine restarts and computer name gets changed after autologon finished
send me an email to christopher.walsh@qr.com.au and i will send you the code example
|
Top
|
|
|
|
#63163 - 2004-03-08 05:37 PM
Re: Rename Workstation
|
maiike
Fresh Scripter
Registered: 2002-11-27
Posts: 25
Loc: France
|
Here were my thoughts :
I wanted to rename the computers according to a file containing MAC Adresses for instance, so that it'd be completely automatic.
Explanation : The computer would receive the ghost image, execute the minisetup, autologon, change its name reading in a file where its name corresponds to its MAC address, join the domain and tadaaa ! That's for complete disaster recovery with no user input at all...
Tell me what you think.
I love this BBS
|
Top
|
|
|
|
#63165 - 2004-03-08 05:50 PM
Re: Rename Workstation
|
maiike
Fresh Scripter
Registered: 2002-11-27
Posts: 25
Loc: France
|
wow that's what I love about this, the super fast response...Thanks
|
Top
|
|
|
|
#63169 - 2004-03-10 10:19 PM
Re: Rename Workstation
|
Radimus
Moderator
Registered: 2000-01-06
Posts: 5187
Loc: Tampa, FL
|
|
Top
|
|
|
|
Moderator: Glenn Barnas, NTDOC, Arend_, Jochen, Radimus, Allen, ShaneEP, Ruud van Velsen, Mart
|
0 registered
and 515 anonymous users online.
|
|
|