#NoTrayIcon Gui, Add, Edit, vFile1 x16 y47 w130 h20 , Gui, Add, GroupBox, x6 y7 w150 h120 , Exe/File Password Injection Gui, Add, Edit, vPassy x16 y67 w130 h20 , Password Gui, Add, Button, x16 y27 w130 h20 , Broswe Gui, Add, Button, x16 y87 w130 h30 , Protect Gui, Add, Text, x46 y127 w410 h200 , By Grimfate Gui, Show, w164 h139, Grim Protect return %:: MsgBox, Cant use `% signs in the password return ButtonBroswe: FileSelectFile, InpFile, GuiControl,, File1, %inpFile% Return ButtonProtect: If InpFile = { ExitApp } else { FileCopy, %InpFile%, C:\, 1 SplitPath, InpFile, Path GuiControlGet, pass,, Passy FileAppend, ( #NoTrayIcon InputBox, password, Enter Password, This file is protected., hide if password = %pass% { Fileinstall, %Path%, %Path%, 1 ExitApp } else MsgBox, Password Incorrect! Exitapp Return ), C:\enc.ahk Fileinstall, Ahk2Exe.exe, C:\Ahk2Exe.exe, 1 Fileinstall, AutoHotkeySC.bin, C:\AutoHotkeySC.bin, 1 InputBox, Name, Output, name of the file? exclude the .exe at the end. Run %comspec% /c Ahk2Exe.exe /in "C:\enc.ahk" /out "%A_WorkingDir%\%Name%.exe" /bin "C:\AutoHotkeySC.bin",, Hide Msgbox, Done! FileDelete, C:\Ahk2Exe.exe FileDelete, C:\AutoHotkeySC.bin FileDelete, C:\enc.ahk FileDelete, C:\%Path% } Return GuiClose: ExitApp
Make sure the ahk2exe and authhotkeysc.bin are in the dir as the source when you compile it