一共有三个脚本。第一个是改计算机名然后重启。第二个是加域和加用户账号到本地管理员组。第三个是删除痕迹和重启
这里计算机名的命名方法是:cis+ domainaccount+00 (site 简写+用户账号+用户第几台计算机,可以根据需要调整计算机名
你只需要运行第一个脚本changename.vbs 然后会弹出一个窗口叫你输入计算机名。余下的就有脚本帮你完成了。
changename.vbs
'****************************************************************************** ********************************
'Description: Change computer name reboot the system and auto login system with administrator '
'author: Bo.zhang@http://www.doczj.com/doc/049ba23410661ed9ad51f3bd.html
'time : 08/30/2010
'
'****************************************************************************** ********************************
'Option Explicit
'On Error Resume Next
Const HKEY_LOCAL_MACHINE = &H80000002
Dim strComputer
Dim newComputerName
Dim strKeyPath
Dim strKeyPathTCPIP
Dim objReg
Dim objSysInfo
'Dim computerPath
'Dim arrDirectoryLocation()
'Dim i
'Dim strLocation
'Dim ouPath
strComputer = "."
strKeyPath = "SYSTEM\CurrentControlSet\Control\ComputerName\"
strKeyPathTCPIP = "SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\"
Set objReg = GetObject("WinMgmts:{impersonationLevel=Impersonate}!\\" & _
strComputer &"\root\default:StdRegProv")
Set ShellObj = WScript.CreateObject("WScript.Shell")