#include Func ok() $un = RegWrite ("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon","DefaultUserName","REG_SZ",GUICtrlRead($user)) $pw = RegWrite ("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon","DefaultPassword","REG_SZ",GUICtrlRead($pass)) $al = RegWrite ("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon","AutoAdminLogon","REG_SZ",$checkval) if $un AND $pw AND $al Then MsgBox(64,"Auto Logged!","Auto Logging eseguito con succeso!") Else MsgBox(16,"Auto Logging Failed","L' Auto Logging non è stato impostato a cusa di errori convenuti durante la scrittura dei dati") EndIf EndFunc GUICreate ("Auto Logger - torels_",300,180) GUISetIcon (@WindowsDir & "\system32\shell32.dll",-171) $filemenu = GUICtrlCreateMenu("File") $exp = GUICtrlCreateMenuItem("Esporta...",$filemenu) $imp = guictrlcreatemenuitem("Importa...",$filemenu) GUICtrlCreateLabel ("Username:",5,13,60,20) $user = GUICtrlCreateInput (@username,60,10,235,20) GUICtrlCreateLabel ("Password:",5,43,60,20) $pass = GUICtrlCreateInput ("",60,40,235,20,0x0020) $check = GUICtrlCreateCheckbox ("Attivato",5,70,60,30) $ok = GUICtrlCreateButton("OK",5,110,290,30) GUICtrlCreateLabel("Copyright (C) 2008 torels_ ",5,145) $chkval = RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon","AutoAdminLogon") $checkval = $chkval if $chkval = 0 Then GUICtrlSetstate($check,$GUI_UNCHECKED) Else GUICtrlSetstate($check,$GUI_CHECKED) EndIf GUISetState() While 1 Switch GUIGetMsg() case -3 Exit case $check $checkv = guictrlread($check) if $checkv = 1 Then $checkval = 1 Else $checkval = 0 EndIf case $ok if GUICtrlRead($user) <> "" then ok() Else MsgBox(0 + 16 + 0,"Attenzione!","Inserisci un Username!") EndIf case $exp if guictrlread($user) <> "" then $selexp = FileSaveDialog("Esporta le impostazioni",@scriptfullpath,"Auto Logger Profile (*.alp)") if @error Then $selexp = "" if not StringRight($selexp,4) = ".alp" then $selexp = $selexp & ".alp" fileopen($selexp,2) FileWriteLine($selexp,guictrlread($user)) FileWriteLine($selexp,guictrlread($pass)) FileWriteLine($selexp,$checkval) FileClose($selexp) Else MsgBox(16,"Inserisci Un Username!","Inserisci un Username!") ;EndIf EndIf Case $imp $selimp = FileOpenDialog("Importa le impostazioni",@scriptfullpath,"Auto Logger Profile (*.alp)") FileOpen($selimp,0) GUICtrlSetData($user,FileReadLine($selimp,1)) GUICtrlSetData($pass,FileReadLine($selimp,2)) $readchkval = FileReadLine($selimp,3) if $readchkval = 0 Then GUICtrlSetstate($check,$GUI_UNCHECKED) $checkval = 0 Else GUICtrlSetstate($check,$GUI_CHECKED) $checkval = 1 EndIf FileClose($selimp) EndSwitch WEnd