ezzetabi Posted May 22, 2005 Share Posted May 22, 2005 (edited) The password, username, domain name you insert are used for login after chdsk bootime. They are not checked, and the autologon is disabled after the job. AutoItSetOption("MustDeclareVars", 1) Local $aDrives = DriveGetDrive ( "FIXED" ) Local $c If Not IsAdmin() Then MsgBox(4096 + 16, 'Error', 'You have to be admin for using this.') Else If $cmdline[0] = 0 Then Local $sDomain = InputBox('Domain', 'Domain name?', @computername) Local $sUserN = InputBox('User', 'Username?', @username) Local $sPass = InputBox('Password', 'Password?', '', '-') RegWrite('HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Winlogon', 'AutoAdminLogon', 'REG_SZ',1) RegWrite('HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Winlogon', 'DefaultDomainName', 'REG_SZ', $sDomain) RegWrite('HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Winlogon', 'DefaultUserName', 'REG_SZ', $sUserN) RegWrite('HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Winlogon', 'DefaultPassword', 'REG_SZ', $sPass) ;ChkDsk For $c = 1 to $aDrives[0] RunWait(@comspec & ' /c echo y|chkdsk ' & $aDrives[$c] & ' /f /r /x', '') Next RegWrite('HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce', 'FixnDefrag', 'REG_SZ', '"' & @ScriptFullPath & '" /secondpart') Shutdown(6) Else RegWrite('HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Winlogon', 'AutoAdminLogon', 'REG_SZ', 0) RegDelete('HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Winlogon', 'DefaultPassword') ;Defrag For $c = 1 to $aDrives[0] RunWait(@comspec & ' /c defrag ' & $aDrives[$c] & ' -f', '') Next Shutdown(13) EndIf EndIf Edited May 22, 2005 by ezzetabi Link to comment Share on other sites More sharing options...
PerryRaptor Posted May 22, 2005 Share Posted May 22, 2005 Why don't you schedule a CHKDSK, CleanMgr, and a Defrag on each machine using the "AT" command? I have them set to run each Saturday morning. Link to comment Share on other sites More sharing options...
Mr. Analogy Posted December 14, 2005 Share Posted December 14, 2005 Could you explain a bit what this does? E.g., if it encounters errors during Chkdsk will it reboot and schedule a ChkDsk on startup to finish fixing errors on the disk? -Clay MrAnalogy@gmail.com Link to comment Share on other sites More sharing options...
PerryRaptor Posted December 17, 2005 Share Posted December 17, 2005 (edited) It runs a ChkDsk on logical partitions on the boot hard drive and on secondary hard drives. It schedules and reboots computer/server and runs a ChkDsk on boot partition during bootup. After bootup, runs Defrag on all hard drives and partitions once. After all drives have been defragged the system powers down/shuts down. Raid setups may act differently depending on raid controller manufacturer, firmware, and model. Edited December 17, 2005 by PerryRaptor Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now