How to make a 7-Zip Switchless Installer in Application Installs Posted February 5, 2009 · Edited February 5, 2009 by judolphin What a great guide, thanks so much!To automate the process even more: 1. Modify 7zs.sfx as desired according to OP's instructions2. Copy 7zS.sfx to your SYSTEM32 directory3. Enter the following into a batch file:-------------------------------BEGIN CODE-------------------------------@echo offcls%~d1cd %~p1echo Enter the command (e.g. "msistub setup.msi /qb-!") without quotes:echo.SET /P CMDLINE=echo ;!@Install@!UTF-8! > config.txtecho RunProgram="%CMDLINE%" >> config.txtecho ;!@InstallEnd@! >> config.txtcopy /b %windir%\system32\7zs.sfx + config.txt + %1 %~n1.exedel /q config.txt------------------------------- END CODE -------------------------------(The "code" tag messed up the echo commands)4. Save batch file as %WINDIR%\System32\CreateInstaller.bat (save as UTF-8 as stated by original poster)5. In Windows Explorer, Go to the "Tools\Folder Options" 6. under the "File Types" tab, go to the .7Z extension and click "Advanced"7. Click "New..."8. Under "Action" type "Create Installer" without quotes9. Under "Application used to perform action" type %WINDIR%\system32\CreateInstaller.bat "%1"10. Now, right-click any .7Z file you want to convert into an installer, and click "Create Installer"11. A DOS window will prompt you for the command you want to execute within the 7Z archive. Enter it without quotes.12. Voila! The installer appears alongside the 7Z file.Sorry I don't have time at the moment to upload screen shots. Just wanted to post this up. It's been a *great* tool for me. Thanks! 0
How to make a 7-Zip Switchless Installer
in Application Installs
Posted · Edited by judolphin
What a great guide, thanks so much!
To automate the process even more:
1. Modify 7zs.sfx as desired according to OP's instructions
2. Copy 7zS.sfx to your SYSTEM32 directory
3. Enter the following into a batch file:
-------------------------------BEGIN CODE-------------------------------
@echo off
cls
%~d1
cd %~p1
echo Enter the command (e.g. "msistub setup.msi /qb-!") without quotes:
echo.
SET /P CMDLINE=
echo ;!@Install@!UTF-8! > config.txt
echo RunProgram="%CMDLINE%" >> config.txt
echo ;!@InstallEnd@! >> config.txt
copy /b %windir%\system32\7zs.sfx + config.txt + %1 %~n1.exe
del /q config.txt
------------------------------- END CODE -------------------------------
(The "code" tag messed up the echo commands)
4. Save batch file as %WINDIR%\System32\CreateInstaller.bat (save as UTF-8 as stated by original poster)
5. In Windows Explorer, Go to the "Tools\Folder Options"
6. under the "File Types" tab, go to the .7Z extension and click "Advanced"
7. Click "New..."
8. Under "Action" type "Create Installer" without quotes
9. Under "Application used to perform action" type
10. Now, right-click any .7Z file you want to convert into an installer, and click "Create Installer"
11. A DOS window will prompt you for the command you want to execute within the 7Z archive. Enter it without quotes.
12. Voila! The installer appears alongside the 7Z file.
Sorry I don't have time at the moment to upload screen shots. Just wanted to post this up. It's been a *great* tool for me. Thanks!