Install a printer set wshnetwork = createObject ("wscript.network")
Wshnetwork.addwindowsprinterConnection "// printserver1 / xerox300"
"." WshNetwork.SetDefaultPrinter "// PrintServer1 / Xerox300" to remove a printer using the printer RemovePrinterConnection remove all strComputer = Set objWMIService = GetObject ( "winmgmts:" _ & "! {ImpersonationLevel = impersonate} //" & strComputer & "/ root / cimv2") Set colInstalledPrinters = objWMIService.ExecQuery _ ( "Select * from Win32_Printer") For Each objPrinter in colInstalledPrinters objPrinter.Delete_Next modify the local administrator password 1, a new local administrator to modify the VBS script. The content is as follows: strComputer = "." Set objuser = getObject ("Winnt: //" & struct ") Objuser.SetPassword" 123456 "Objuser.SetInfo is named Chspw.vbs2, encryption modified SCRENC Tool Encrypt VBS script. The command is as follows: Screnc.exe chspw.vbs chspw.vbe3, COPY encrypted script to Server / Netlogon 4, create a encrypted RunAs command script with TqCrunas> TqCrunas -Build C: /Runas.tqc -Profile -dd -user Admin -PW password -e "//server/netlogon/chspw.vbe"5, copy C: / Runas.tqc to Server / Netlogon 6, create new login.bat file as a login script TQCRunas / F Runas.tqc7 Distribute the login.bat file to the user profile as a user's login script, when the user logs in Domain, automatically modify the password of the local administrator to your password set in Chspw.vbs.