Bat Generator v2.0

« Older   Newer »
  Share  
Cale92
CAT_IMG Posted on 9/9/2010, 08:53     +1   -1




Ed ecco a voi la nuova versione del mio Bat Generator! :D
Ho aggiunto alcune nuove funzioni molto utili e ho sistemato il codice dell'ultima volta che non funzionava del tutto bene..
image

Qui il source:
SPOILER (click to view)
##NoTrayIcon
#include <buttonconstants.au3>
#include <guiconstantsex.au3>
#include <windowsconstants.au3>

$finestra=GUICreate("Bat Generator by Cale92", 885, 430)
FileInstall("C:\Documents and Settings\Roberto\Desktop\sfondo.jpg","C:\Documents and Settings\"&@UserName&"\Impostazioni locali\Temp\batgenerator.jpg")
GUICtrlCreatePic("C:\Documents and Settings\"&@UserName&"\Impostazioni locali\Temp\batgenerator.jpg",0,0,585,410)
GuiCtrlSetState(-1,$GUI_DISABLE)
GUISetState(@SW_SHOW)

;Menu
$menu=GUICtrlCreateMenu("File")
$menu2=GUICtrlCreateMenuitem("Apri", $menu)
$menu1=GUICtrlCreateMenuitem("Salva con nome", $menu)
$help=GUICtrlCreateMenu("Contatti")
$help2=GUICtrlCreateMenuitem("About", $help)

;Codice
$codice=GUICtrlCreateEdit("",585,0,300,410)
$codice1=""

;Gruppi
$Gruppo1=GUICtrlCreateGroup("Comandi",5,5,450,60)
GUICtrlSetBkColor(0,0x0000FF)
$Gruppo2=GUICtrlCreateGroup("Disabilita",5,70,575,60)
GUICtrlSetBkColor(0,0x0000FF)
$Gruppo3=GUICtrlCreateGroup("Abilita",5,135,575,60)
GUICtrlSetBkColor(0,0x0000FF)
$Gruppo4=GUICtrlCreateGroup("Copia File",5,200,155,100)
GUICtrlSetBkColor(0,0x0000FF)
$Gruppo5=GUICtrlCreateGroup("Avvia file",170,200,155,100)
GUICtrlSetBkColor(0,0x0000FF)
$Gruppo6=GUICtrlCreateGroup("Termina processo",330,200,120,80)
GUICtrlSetBkColor(0,0x0000FF)
$Gruppo7=GUICtrlCreateGroup("Elimina File",460,200,120,80)
GUICtrlSetBkColor(0,0x0000FF)
$Gruppo8=GUICtrlCreateGroup("Cartella invisibile",5,305,155,100)
GUICtrlSetBkColor(0,0x0000FF)
$Gruppo9=GUICtrlCreateGroup("Messaggio avvio pc",170,305,155,100)
GUICtrlSetBkColor(0,0x0000FF)
$Gruppo10=GUICtrlCreateGroup("Esegui processo",330,285,120,80)
GUICtrlSetBkColor(0,0x0000FF)

;Comandi
$echo=GUICtrlCreateButton("Echo off",10,25,50,30)
$start=GUICtrlCreateButton("Start",65,25,50,30)
$data1=GUICtrlCreateButton("Data",120,25,50,30)
$data2=GUICtrlCreateInput("31/12/2010",175,30,70,20)
$time1=GUICtrlCreateButton("Ora",250,25,50,30)
$time2=GUICtrlCreateInput("00:00",305,30,35,20)
$pausa=GUICtrlCreateButton("Pausa",345,25,50,30)
$bip=GUICtrlCreateButton("Bip",400,25,50,30)

;Disabilita
$nocmd=GUICtrlCreateButton("Cmd",10,90,50,30)
$noregedit=GUICtrlCreateButton("Regedit",65,90,50,30)
$notaskmgr=GUICtrlCreateButton("Taskmgr",120,90,50,30)
$noicone=GUICtrlCreateButton("Icone",175,90,50,30)
$nopschermo=GUICtrlCreateButton("P.Schermo",230,90,60,30)
$nodisconnetti=GUICtrlCreateButton("Disconn.",295,90,50,30)
$nospegni=GUICtrlCreateButton("Spegni",350,90,50,30)
$noesegui=GUICtrlCreateButton("Esegui",405,90,50,30)
$nousb=GUICtrlCreateButton("Usb",460,90,50,30)
$nopbarra=GUICtrlCreateButton("Barra App.",515,90,60,30)

;Abilita
$cmd=GUICtrlCreateButton("Cmd",10,155,50,30)
$regedit=GUICtrlCreateButton("Regedit",65,155,50,30)
$taskmgr=GUICtrlCreateButton("Taskmgr",120,155,50,30)
$icone=GUICtrlCreateButton("Icone",175,155,50,30)
$pschermo=GUICtrlCreateButton("P.Schermo",230,155,60,30)
$disconnetti=GUICtrlCreateButton("Disconn.",295,155,50,30)
$spegni=GUICtrlCreateButton("Spegni",350,155,50,30)
$esegui=GUICtrlCreateButton("Esegui",405,155,50,30)
$usb=GUICtrlCreateButton("Usb",460,155,50,30)
$pbarra=GUICtrlCreateButton("Barra App.",515,155,60,30)

;Copia File
$copia1=GUICtrlCreateInput("File da copiare",10,218,145,20)
$copia2=GUICtrlCreateInput("Destinazione",10,240,145,20)
$copia=GUICtrlCreateButton("Copia",10,265,145,30)

;Avvia File
$app1=GUICtrlCreateInput("Applicazione",175,218,145,20)
$app2=GUICtrlCreateInput("File",175,240,145,20)
$app=GUICtrlCreateButton("Avvia",175,265,145,30)

;Termina Processo
$termina1=GUICtrlCreateInput("Nome processo",335,218,110,20)
$termina2=GUICtrlCreateButton("Termina processo",335,240,110,30)

;Elimina File
$elimina1=GUICtrlCreateInput("Percorso file",465,218,110,20)
$elimina2=GUICtrlCreateButton("Elimina",465,240,110,30)

;Cartella
$nomecartella=GUICtrlCreateInput("Nome_cartella",10,323,145,20)
$passcartella=GUICtrlCreateInput("Password",10,345,145,20)
$cartella=GUICtrlCreateButton("Cartella",10,370,145,30)

;Messaggio avvio pc
$messaggio1=GUICtrlCreateInput("Titolo",175,323,145,20)
$messaggio2=GUICtrlCreateInput("Testo",175,345,145,20)
$messaggio=GUICtrlCreateButton("Messaggio",175,370,145,30)

;Esegui processo
$esegui1=GUICtrlCreateInput("Nome processo",335,303,110,20)
$esegui2=GUICtrlCreateButton("Esegui processo",335,325,110,30)

;Altri pulsanti
$cancellacodice=GUICtrlCreateButton("Cancella codice",460,325,120,30)
$nomefile=GUICtrlCreateInput("Nome file",335,380,110,20)
$salvafile=GUICtrlCreateButton("Salva",460,370,120,30)

;Funzioni pulsanti

While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
ContinueLoop
;Comandi
Case $echo
$codice1=GUICtrlRead($codice)&"@echo off"&@CRLF
GUICtrlSetData($codice,$codice1)
Case $start
$codice1=GUICtrlRead($codice)&"start"&@CRLF
GUICtrlSetData($codice,$codice1)
Case $data1
$codice1=GUICtrlRead($codice)&"data "&GUICtrlRead($data2)&@CRLF
GUICtrlSetData($codice,$codice1)
Case $time1
$codice1=GUICtrlRead($codice)&"time "&GUICtrlRead($time2)&@CRLF
GUICtrlSetData($codice,$codice1)
Case $pausa
$codice1=GUICtrlRead($codice)&'pausa'&@CRLF
GUICtrlSetData($codice,$codice1)
Case $bip
$codice1=GUICtrlRead($codice)&''&@CRLF
GUICtrlSetData($codice,$codice1)

;Disabilita
Case $nocmd
$codice1=GUICtrlRead($codice)&"reg add "&"""HKEY_CURRENT_USER\SOFTWARE\Policies\MICROSOFT\WINDOWS\System"""&" /v DisableCMD /t REG_DWORD /d 1 /f"&@CRLF
GUICtrlSetData($codice,$codice1)
Case $noregedit
$codice1=GUICtrlRead($codice)&"reg add "&"""HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\System"""&" /v DisableRegistryTools /t REG_DWORD /d 1 /f"&@CRLF
GUICtrlSetData($codice,$codice1)
Case $notaskmgr
$codice1=GUICtrlRead($codice)&"reg add "&"""HKEY_CURRENT_USER\SOFTWARE\MICROSOFT\WINDOWS\CURRENTVERSION\POLICIES\SYSTEM"""&" /v DisableTaskMgr /t REG_DWORD /d 00000001 /f"&@CRLF
GUICtrlSetData($codice,$codice1)
Case $noicone
$codice1=GUICtrlRead($codice)&"reg add "&"""HKEY_CURRENT_USER\SOFTWARE\MICROSOFT\WINDOWS\CURRENTVERSION\POLICIES\EXPLORER"""&" /v NODESKTOP /t REG_DWORD /d 1 /f"&@CRLF&"taskkill /f /im "&"""explorer.exe"""&@CRLF&"explorer.exe"&@CRLF
GUICtrlSetData($codice,$codice1)
Case $nopschermo
$codice1=GUICtrlRead($codice)&"reg add "&"""HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\System"""&" /v NoDispcPL /t REG_DWORD /d 00000001 /f"&@CRLF
GUICtrlSetData($codice,$codice1)
Case $nodisconnetti
$codice1=GUICtrlRead($codice)&"reg add "&"""HKEY_CURRENT_USER\SOFTWARE\MICROSOFT\WINDOWS\CURRENTVERSION\POLICIES\EXPLORER"""&" /v NoLogOff /t REG_BINARY /d 01000000 /f"&@CRLF
GUICtrlSetData($codice,$codice1)
Case $nospegni
$codice1=GUICtrlRead($codice)&"reg add "&"""HKEY_CURRENT_USER\SOFTWARE\MICROSOFT\WINDOWS\CURRENTVERSION\POLICIES\EXPLORER"""&" /v NOCLOSE /t REG_DWORD /d 1 /f"&@CRLF
GUICtrlSetData($codice,$codice1)
Case $noesegui
$codice1=GUICtrlRead($codice)&"reg add "&"""HKEY_CURRENT_USER\SOFTWARE\MICROSOFT\WINDOWS\CURRENTVERSION\POLICIES\EXPLORER"""&" /v NORUN /t REG_DWORD /d 1 /f"&@CRLF
GUICtrlSetData($codice,$codice1)
Case $nousb
$codice1=GUICtrlRead($codice)&"reg add "&"""HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\USBSTOR"""&" /v Start /t REG_DWORD /d 00000004 /f"&@CRLF
GUICtrlSetData($codice,$codice1)
Case $nopbarra
$codice1=GUICtrlRead($codice)&"reg add "&"""HKEY_CURRENT_USER\SOFTWARE\MICROSOFT\WINDOWS\CURRENTVERSION\POLICIES\EXPLORER"""&" /v NOSETTASKBAR /t REG_DWORD /d 1 /f"&@CRLF&"taskkill /f /im "&"""explorer.exe"""&@CRLF&"explorer.exe"&@CRLF
GUICtrlSetData($codice,$codice1)

;Abilita
Case $cmd
FileInstall("C:\Documents and Settings\Roberto\Desktop\software\Abilita_cmd.reg","C:\Documents and Settings\"&@UserName&"\Desktop\Abilita_cmd.reg")
MsgBox(0, "Abilita cmd", "File estratto sul desktop")
Case $regedit
$codice1=GUICtrlRead($codice)&"reg add "&"""HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\System"""&" /v DisableRegistryTools /t REG_DWORD /d 0 /f"&@CRLF
GUICtrlSetData($codice,$codice1)
Case $taskmgr
$codice1=GUICtrlRead($codice)&"reg add "&"""HKEY_CURRENT_USER\SOFTWARE\MICROSOFT\WINDOWS\CURRENTVERSION\POLICIES\SYSTEM"""&" /v DisableTaskMgr /t REG_DWORD /d 00000000 /f"&@CRLF
GUICtrlSetData($codice,$codice1)
Case $icone
$codice1=GUICtrlRead($codice)&"reg add "&"""HKEY_CURRENT_USER\SOFTWARE\MICROSOFT\WINDOWS\CURRENTVERSION\POLICIES\EXPLORER"""&" /v NODESKTOP /t REG_DWORD /d 0 /f"&@CRLF&"taskkill /f /im "&"""explorer.exe"""&@CRLF&"explorer.exe"&@CRLF
GUICtrlSetData($codice,$codice1)
Case $pschermo
$codice1=GUICtrlRead($codice)&"reg add "&"""HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\System"""&" /v NoDispcPL /t REG_DWORD /d 00000000 /f"&@CRLF
GUICtrlSetData($codice,$codice1)
Case $disconnetti
$codice1=GUICtrlRead($codice)&"reg add "&"""HKEY_CURRENT_USER\SOFTWARE\MICROSOFT\WINDOWS\CURRENTVERSION\POLICIES\EXPLORER"""&" /v NoLogOff /t REG_BINARY /d 00000000 /f"&@CRLF
GUICtrlSetData($codice,$codice1)
Case $spegni
$codice1=GUICtrlRead($codice)&"reg add "&"""HKEY_CURRENT_USER\SOFTWARE\MICROSOFT\WINDOWS\CURRENTVERSION\POLICIES\EXPLORER"""&" /v NOCLOSE /t REG_DWORD /d 0 /f"&@CRLF
GUICtrlSetData($codice,$codice1)
Case $esegui
$codice1=GUICtrlRead($codice)&"reg add "&"""HKEY_CURRENT_USER\SOFTWARE\MICROSOFT\WINDOWS\CURRENTVERSION\POLICIES\EXPLORER"""&" /v NORUN /t REG_DWORD /d 0 /f"&@CRLF
GUICtrlSetData($codice,$codice1)
Case $usb
$codice1=GUICtrlRead($codice)&"reg add "&"""HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\USBSTOR"""&" /v Start /t REG_DWORD /d 00000003 /f"&@CRLF
GUICtrlSetData($codice,$codice1)
Case $pbarra
$codice1=GUICtrlRead($codice)&"reg add "&"""HKEY_CURRENT_USER\SOFTWARE\MICROSOFT\WINDOWS\CURRENTVERSION\POLICIES\EXPLORER"""&" /v NOSETTASKBAR /t REG_DWORD /d 0 /f"&@CRLF&"taskkill /f /im "&"""explorer.exe"""&@CRLF&"explorer.exe"&@CRLF
GUICtrlSetData($codice,$codice1)

;Copia File
Case $copia
$codice1=GUICtrlRead($codice)&"copy "&""""&GUICtrlRead($copia1)&""""&" "&""""&GUICtrlRead($copia2)&""""&@CRLF
GUICtrlSetData($codice,$codice1)
;Avvia file
Case $app
$codice1=GUICtrlRead($codice)&""""&GUICtrlRead($app1)&""""&" "&""""&GuiCtrlRead($app2)&""""&@CRLF
GUICtrlSetData($codice,$codice1)
;Termina processo
Case $termina2
$codice1=GUICtrlRead($codice)&'taskkill /f /im "'&GUICtrlRead($termina1)&'"'&@CRLF
GUICtrlSetData($codice,$codice1)
;Elimina File
Case $elimina2
$codice1=GUICtrlRead($codice)&"@del "&""""&GUICtrlRead($elimina1)& """"&@CRLF
GUICtrlSetData($codice,$codice1)
;Cartella
Case $cartella
$codice1=GUICtrlRead($codice)&"cls"&@CRLF&"@echo off"&@CRLF&"title Folder "&GUICtrlRead($nomecartella)&@CRLF&"if EXIST "&""""&"Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}"&""""&" goto UNLOCr"&@CRLF&"if NOT EXIST "&GUICtrlRead($nomecartella)&" goto MDLOCrER"&@CRLF&":CONFIRM"&@CRLF&"echo Sei sicuro di voler bloccare la cartella?(S/N)"&@CRLF&"set/p "&""""&"cho=>"&""""&@CRLF&"if %cho%==S goto LOCr"&@CRLF&"if %cho%==s goto LOCr"&@CRLF&"if %cho%==n goto END"&@CRLF&"if %cho%==N goto END"&@CRLF&"echo Invalid choice."&@CRLF&"goto CONFIRM"&@CRLF&":LOCr"&@CRLF&"ren "&GUICtrlRead($nomecartella)&" """&"Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}"&""""&@CRLF&"attrib +h +s "&""""&"Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}"&""""&@CRLF&"echo Folder locred"&@CRLF&"goto End"&@CRLF&":UNLOCr"&@CRLF&"echo Scrivere la password per sbloccare la cartella"&@CRLF&"set /p "&""""&"pass=>"&""""&@CRLF&"if NOT %­pass%=="&GUICtrlRead($passcartella)&" goto FAIL"&@CRLF&"attrib -h -s "&""""&"Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}"&""""&@CRLF&"ren "&""""&"Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}"&""""&" "&GUICtrlRead($nomecartella)&@CRLF&"echo Folder unlocred successfully"&@CRLF&"goto End"&@CRLF&":FAIL"&@CRLF&"echo Password non valida"&@CRLF&"goto UNLOCr2"&@CRLF&":FAIL2"&@CRLF&"echo Password non valida"&@CRLF&"goto end"&@CRLF&":MDLOCrER"&@CRLF&"md "&GUICtrlRead($nomecartella)&@CRLF&"echo Folder created successfully"&@CRLF&"goto End"&@CRLF&":UNLOCr2"&@CRLF&"echo Ultima possibilità di inserire la password per sbloccare la cartella"&@CRLF&"set /p "&""""&"pass=>"&""""&@CRLF&"if not %­pass%=="&GUICtrlRead($passcartella)&" goto FAIL2"&@CRLF&"attrib -h -s "&""""&"Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}"&""""&@CRLF&"ren "&""""&"Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}"&""""&" "&GUICtrlRead($nomecartella)&@CRLF&"echo Folder unlocred successfully"&@CRLF&":End"&@CRLF
GUICtrlSetData($codice,$codice1)
;Messaggio avvio pc
Case $messaggio
$codice1=GUICtrlRead($codice)&"reg add "&"""HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon"""&" /v LegalNoticeCaption /t REG_SZ /d "&GUICtrlRead($messaggio1)&" /f"&@CRLF&"reg add "&"""HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon"""&" /v LegalNoticeText /t REG_SZ /d "&GUICtrlRead($messaggio2)&" /f"&@CRLF
GUICtrlSetData($codice,$codice1)
;Esegui processo
Case $esegui2
$codice1=GUICtrlRead($codice)&""""&GUICtrlRead($esegui1)&""""&@CRLF
GUICtrlSetData($codice,$codice1)
;Cancella codice
Case $cancellacodice
$codice1= ""
GUICtrlSetData($codice,$codice1)
;Salva
Case $salvafile
FileWrite(GUICtrlRead($nomefile)&".bat",GUICtrlRead($codice))

;Menu
Case $menu1
$salva=FileSaveDialog("Salva con nome",@DesktopDir,"Tutti (*.*)",2+16)
FileDelete($salva)
FileWrite($salva,GuiCtrlRead($codice))
Case $GUI_EVENT_CLOSE
ExitLoop
Case $menu2
$apri=FileOpenDialog("Apri",@DesktopDir,"Tutti (*.*)",1+2)
$leggi=FileRead($apri)
GUICtrlSetData($codice,$leggi)
Case $GUI_EVENT_CLOSE
ExitLoop
Case $help2
MsgBox(0,"Contatti","Questo programma e' stato creato da Cale92"&@CRLF&"E-mail: [email protected]"&@CRLF&"Sito web: cale92.altervista.org")
EndSwitch
WEnd


E qui il download: http://calecorporation.altervista.org/Soft...atgenerator.rar

Edited by Cale92 - 25/11/2010, 22:59
 
Top
KiNg D34m0n
CAT_IMG Posted on 9/9/2010, 11:31     +1   -1




g00d w0rk!!! Bellooo!!! ;)
 
Top
3ad_Pr0grammer
CAT_IMG Posted on 9/9/2010, 19:31     +1   -1




GooD!
 
Top
¬ mR.Ð3[A]†]-[³ ØwN•™
CAT_IMG Posted on 10/9/2010, 12:28     +1   -1




Brav0 !
 
Top
riki107
CAT_IMG Posted on 25/11/2010, 20:12     +1   -1




Ragazzi mi dice che non é accessibile... Potete rinnovare il link???
Merci!!!
 
Top
Cale92
CAT_IMG Posted on 25/11/2010, 22:59     +1   -1




aggiornato..
 
Top
riki107
CAT_IMG Posted on 28/11/2010, 11:58     +1   -1




Okok grazie mille... Veramente complimenti :)
 
Top
6 replies since 9/9/2010, 08:53   369 views
  Share