Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @echo off
- Set SFX_Name=TestSFX.exe
- Set SfxOptions=SfxOptions.txt
- Set AddFile=MyBatchFile.bat
- Set Icon=HackooIcon.ico
- Set Winrar="%ProgramFiles%\WinRAR\WinRar.exe"
- Set ExtractedPath=%tmp%\hackoo
- Set Setup=%ExtractedPath%\MyBatchFile.bat
- Set Password=hackoo123
- (
- echo ;The comment below contains SFX script commands
- echo Path="%ExtractedPath%"
- echo Silent=1
- echo OverWrite=1
- echo Setup="%Setup%"
- )> "%SfxOptions%"
- %Winrar% a -c -cfg- -ep1 -idq -m5 -mdg -r -s -sfx -y -iicon"%Icon%" -hp"%Password%" "-z%SfxOptions%" "%SFX_Name%" "%AddFile%"
- if errorlevel 1 goto Failure
- ::del "%~dp0SfxOptions.txt"
- goto :EOF
- :Failure
- ::del "%~dp0SfxOptions.txt"
- echo.
- echo Error on creation of "%~dp0%SFX_Name%"
- echo.
- pause
Add Comment
Please, Sign In to add comment