not really perl... but, i use netdom and autologin registry keys as well, note: the nt and 2k netdom tools from the nt/2k resource kits are a little diffrent.
basically i set the machine up to autologin.. then put a scripts in the startup menu that 1)calls the relevent scripts below, 2)deletes the script (because it has a domain passowrd in plain text in it) 3)reboots the pc fyi. i use ghost to build the boxes from image files and ghost walker to change the pc name and machines SID all in one fail swoop. for 2k c:\domain_add\netdom join %computername% /domain:domain /userd:administrator /passwordd:password c:\domain_add\reg delete "hklm\software\microsoft\windows nt\currentversion\winlogon\defaultusername" /force c:\domain_add\reg delete "hklm\software\microsoft\windows nt\currentversion\winlogon\defaultpassword" /force c:\domain_add\reg delete "hklm\software\microsoft\windows nt\currentversion\winlogon\autoadminlogon" /force for nt c:\domain_add\netdom /domain:domain /user:domain\administrator /password:password member %computername% /joindomain c:\domain_add\reg delete "hklm\software\microsoft\windows nt\currentversion\winlogon\defaultusername" /force c:\domain_add\reg delete "hklm\software\microsoft\windows nt\currentversion\winlogon\defaultpassword" /force c:\domain_add\reg delete "hklm\software\microsoft\windows nt\currentversion\winlogon\autoadminlogon" /force ----Original Message Follows---- From: Ali Mesdaq <[EMAIL PROTECTED]> To: [EMAIL PROTECTED] Subject: RE: Changing Computer Name - $20??? Date: Thu, 14 Mar 2002 11:41:25 -0800 Now how can you do it so that it can run this script with the machine not logged in? and then once it reboots it joins a domain without being at the console? -----Original Message----- From: Ky-Anh Phan [mailto:[EMAIL PROTECTED]] Sent: Thursday, March 14, 2002 10:54 AM To: 'JM'; [EMAIL PROTECTED] Subject: RE: Changing Computer Name - $20??? Is this U.S. dollars? :-) use Win32::TieRegistry ( Delimiter => '/', ArrayValues => 0, TiedRef => \$Registry ); $Registry->{'LMachine/SYSTEM/CurrentControlSet/Control/ComputerName/Computer Name'} = $name; $Registry->{'LMachine/SYSTEM/CurrentControlSet/Services/Tcpip/Parameters'} = $name; Win32::InitiateSystemShutdown("","Rebooting the computer",5 ,0 ,1); -----Original Message----- From: JM [mailto:[EMAIL PROTECTED]] Sent: Wednesday, March 13, 2002 8:01 PM To: [EMAIL PROTECTED] Subject: Changing Computer Name - $20??? Hi I'm trying to change a computer name on a Windows 2000 PC, logged in as Administrator. It changes the Computername ENV. Var. but does not change the NetBIOS name. $20.00 to the first person that can help me get this code to work properly. . . use Win32; use Win32::AdminMisc; Win32::AdminMisc::SetComputerName('BLACKBOX'); Win32::InitiateSystemShutdown("","Rebooting the computer",5 ,0 ,1); The Computer reboots properly . . . _______________________________________________ Perl-Win32-Admin mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs _______________________________________________ Perl-Win32-Admin mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs _______________________________________________ Perl-Win32-Admin mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs _________________________________________________________________ Join the world�s largest e-mail service with MSN Hotmail. http://www.hotmail.com _______________________________________________ Perl-Win32-Admin mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
