WinClose("ROMANIA (D:)", "D:\") ShellExecute("Control.exe", "C:\WINDOWS\System32\sysdm.cpl") WinWait("System Properties") ControlCommand("System Properties", "General", "SysTabControl321", "TabRight") ControlCommand("System Properties", "Computer Name", "SysTabControl321", "TabRight") ControlCommand("System Properties", "Hardware", "SysTabControl321", "TabRight") WinWait("System Properties", "Advanced") ControlClick("System Properties", "Advanced", "Button2") WinWait("Performance Options", "Visual Effects") ControlCommand("Performance Options", "Visual Effects", "SysTabControl321", "TabRight") WinWait("Performance Options", "Advanced") ControlClick("Performance Options", "Advanced", "Button8") WinWait("Virtual Memory") if ControlCommand("Virtual Memory", "", "Button4", "IsChecked", "") = 1 Then _postreboot() Else _prereboot() EndIf func _prereboot() ControlCommand("Virtual Memory", "", "Button4", "Check") ControlClick("Virtual Memory", "", "Button5") ControlClick("Virtual Memory", "", "Button7") WinWait("System Control Panel Applet", "", 2) ControlClick("System Control Panel Applet", "", "Button1") WinWaitClose("System Control Panel Applet") ControlClick("Performance Options", "Advanced", "Button11") ControlClick("Performance Options", "Advanced", "Button9") WinWaitClose("Performance Options", "Advanced") ControlClick("System Properties", "Advanced", "Button9") WinWait("System Settings Change") _RunOnce() ControlClick("System Settings Change", "", "Button1") EndFunc Func _RunOnce() Local $key = 'HKCU\Software\Microsoft\Windows\CurrentVersion\RunOnce' If @Compiled Then RegWrite($key, '_AMPOET', 'Reg_sz', '"' & @ScriptFullPath & '" /postrun') Else RegWrite($key, '_AMPOET', 'Reg_sz', '"' & @AutoItExe & '" "' & @ScriptFullPath & '" /postrun') EndIf EndFunc func _postreboot() WinClose("Virtual Memory") WinClose("Performance Options") WinClose("System Properties") run("explorer " & "D:\" ) EndFunc