It is currently Tue May 21, 2013 1:55 pm

All times are UTC - 8 hours




Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: 7-Zip SFX Silent Launch Creator (Batch)
PostPosted: Tue Nov 23, 2010 10:45 am 
Offline

Joined: Sun Oct 19, 2008 12:58 am
Posts: 42
The following Batch can be used to create a Silent 7-Zip SFX that adds only 26KB (or less) to the native 7z file. This method is useful to save space and/or run any App directly from a CD. Comments?

START OF BATCH

@echo Off
ECHO............................................................................
ECHO.
ECHO. . . . 7 z S F X S i l e n t L a u n c h C r e a t o r . . . . . .
ECHO.
ECHO. Version 10.11.23
ECHO.
ECHO............................................................................
ECHO.
ECHO. This uses the files "7zS2.sfx" and "7zrv.exe" from the file
ECHO. "7z920_extra.7z" see (http://sourceforge.net/projects/sevenzip/files/)
ECHO.
ECHO. Place three files, (1) 7zs2.sfx, (2) 7zrv.exe and (3) this batch in a
ECHO. directory. Create a subdirectory called "LOAD_FILES_TO_ARCHIVE_HERE".
ECHO. Run Batch.
ECHO.
ECHO. Note: 3 levels of priorities are automatically used to select the "launch"
ECHO. file that is executed:
ECHO.
ECHO. 1) Files in root folder have higher priority than files in subfolders.
ECHO. 2) File extension priorities (from high to low priority order):
ECHO. bat, exe, inf, msi, cab (under Windows CE), html, htm
ECHO. 3) File name priorities (from high to low priority order):
ECHO. setup, install, run, start
ECHO.
ECHO. Before continuing,
ECHO.
ECHO. 1. Place "Portable" files in "LOAD_FILES_TO_ARCHIVE_HERE" sub-directory.
ECHO.
ECHO.
ECHO. Hit Control Break to Exit or
Pause
Cls
ECHO............................................................................
ECHO.
ECHO. ... Creating 7Z and EXE file (please wait)
ECHO.
ECHO............................................................................
ECHO.
7zrv a 7Z_Archive(LMZA2).7z .\LOAD_FILES_TO_ARCHIVE_HERE\* -mx9 -m0=lzma2
copy /b 7zS2.sfx + 7z_archive(LMZA2).7z "7Z_Archive (Portable 7zs XXX).exe"
cls
ECHO............................................................................
ECHO.
ECHO. D O N E ...
ECHO.
ECHO.
ECHO. Next Step(s)...
ECHO.
ECHO.
ECHO. 1. TEST the SFX!, If OK then...
ECHO.
ECHO. 2. Rename "7Z_Archive (Portable 7zs XXX).exe" to ...
ECHO.
ECHO. 3. Use Resource Hacker to change icon (Optional)...
ECHO.
ECHO. 4. Then run UPX to save ~7KB (Optional)...
ECHO.
ECHO............................................................................
ECHO. NOTE:
ECHO. The SFX will extract and launch from "..LOCAL SETTINGS/TEMP"
ECHO. These can be cleaned up with a simple batch when you dis-mount your USB.
ECHO. A SFX allows yaP and JPE portables to be used directly from a CD also...
ECHO. .... Enjoy! ....
Pause


Top
 Profile  
 
 Post subject: Re: 7-Zip SFX Silent Launch Creator (Batch)
PostPosted: Tue Nov 23, 2010 1:53 pm 
Offline

Joined: Sun Oct 19, 2008 12:58 am
Posts: 42
Similar results can be obtained in the GUI version by deleting the files "7z.sfx" and "7zcon.sfx". Replacing the original with "7zs2.sfx" which has been renamed to "7z.sfx". Pick "Compression Level"="Ultra", Pick "Compression Method"="LZMA2" and Check the box "Create SFX Archive".


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC - 8 hours


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  

Protected by Anti-Spam ACP Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group