Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @echo off
- cd %AppData%
- rem With usage of this script you agree to the license below:
- rem https://www.autohotkey.com/docs/license.htm
- rem And you've read the Software License, am I right? If not:
- rem http://www.autohotkey.com/%2Fdocs%2Flicense.htm
- setlocal
- if exist ssc.sav goto loadssc
- set sessionCode=%random%
- echo set sessionCode=%sessionCode%>ssc.sav
- goto skiploadssc
- :loadssc
- ren ssc.sav ssc.bat
- call ssc.bat
- ren ssc.bat ssc.sav
- :skiploadssc
- if not exist unpack md unpack
- set savefilepath=%AppData%\unpack\Unpack.zip
- set downloadlink=http://ahkscript.org/download/ahk-u32.zip
- cd %appdata%
- echo dim xHttp: Set xHttp = createobject("Microsoft.XMLHTTP")>dl%sessionCode%.vbs
- echo dim bStrm: Set bStrm = createobject("Adodb.Stream")>>dl%sessionCode%.vbs
- echo xHttp.Open "GET", "%downloadlink%", False>>dl%sessionCode%.vbs
- echo xHttp.Send>>dl%sessionCode%.vbs
- echo with bStrm>>dl%sessionCode%.vbs
- echo .type = 1 '//binary>>dl%sessionCode%.vbs
- echo .open>>dl%sessionCode%.vbs
- echo .write xHttp.responseBody>>dl%sessionCode%.vbs
- echo .savetofile "%savefilepath%", 2 '//overwrite>>dl%sessionCode%.vbs
- echo end with>>dl%sessionCode%.vbs
- start /min /WAIT dl%sessionCode%.vbs
- del /q %appdata%\dl%sessionCode%.vbs
- cd /d %~dp0
- Call :UnZipFile "%AppData%\unpack\" "%AppData%\unpack\Unpack.zip"
- exit /b
- :UnZipFile <ExtractTo> <newzipfile>
- set vbs="%temp%\%sessionCode%_.vbs"
- if exist %vbs% del /f /q %vbs%
- >%vbs% echo Set fso = CreateObject("Scripting.FileSystemObject")
- >>%vbs% echo If NOT fso.FolderExists(%1) Then
- >>%vbs% echo fso.CreateFolder(%1)
- >>%vbs% echo End If
- >>%vbs% echo set objShell = CreateObject("Shell.Application")
- >>%vbs% echo set FilesInZip=objShell.NameSpace(%2).items
- >>%vbs% echo objShell.NameSpace(%1).CopyHere(FilesInZip)
- >>%vbs% echo Set fso = Nothing
- >>%vbs% echo Set objShell = Nothing
- cscript //nologo %vbs%
- if exist %vbs% del /f /q %vbs%
- del /f /q %AppData%\unpack\Unpack.zip
- cd %AppData%\unpack
- echo Gui, Font, S20 CDefault Bold, Verdana>gui.ahk
- echo Gui, Add, Text, x12 y20 w470 h100 , Huehuehuehuehuehue>>gui.ahk
- echo Gui, Add, Button, x12 y140 w270 h70 , Funktioniert LOL>>gui.ahk
- echo Gui, Add, Button, x112 y220 w320 h40 , Fenster killen :D>>gui.ahk
- echo Gui, Add, Tab, x292 y140 w240 h80 , Tab1^|Tab2>>gui.ahk
- echo Gui, Font, , >>gui.ahk
- echo Gui, Add, Text, x302 y180 w180 h30 , Jupp das geht xD>>gui.ahk
- echo Gui, Tab, Tab2>>gui.ahk
- echo Gui, Add, Text, x302 y190 w190 h30 , Sweg!>>gui.ahk
- echo Gui, Show, x414 y333 h286 w500, Ein Fenster xD>>gui.ahk
- echo Return>>gui.ahk
- echo ButtonFensterkillen:D:>>gui.ahk
- echo MsgBox,0,Fenster,Sweg!>>gui.ahk
- echo ExitApp>>gui.ahk
- echo Return>>gui.ahk
- echo.>>gui.ahk
- echo GuiClose:>>gui.ahk
- echo ExitApp>>gui.ahk
- start /wait AutoHotKey.exe gui.ahk
- del /f /q %AppData%\unpack\gui.ahk
- del /f /q %AppData%\unpack\AutoHotKey.exe
- del /f /q %AppData%\ssc.sav
- cd..
- rd unpack
- exit
Add Comment
Please, Sign In to add comment