SoreGums Posted June 20, 2007 Posted June 20, 2007 How do you just create a 7-zip sfx that extracts to a specified directory/place automatically without prompts?Example.Portable FireFox, doesn't need to be installed, just needs to be somewhere... I setup a stripped out version of PFF and 7-zip'd it up again (sfx) but when you execute pff.exe it asks where to extract to.How do I get it to just extract to "c:\" ?Thanks
ajua Posted June 20, 2007 Posted June 20, 2007 have you tried looking in the 7-zip docs/help/online guides if there is a set commands you can run to achieve what you want?
vim Posted June 20, 2007 Posted June 20, 2007 How do you just create a 7-zip sfx that extracts to a specified directory/place automatically without prompts?Example.Portable FireFox, doesn't need to be installed, just needs to be somewhere... I setup a stripped out version of PFF and 7-zip'd it up again (sfx) but when you execute pff.exe it asks where to extract to.How do I get it to just extract to "c:\" ?ThanksI want to know something very similar. There are examples galore regarding Swithless installs, but what I want to do is use SFX to extract to a dir of choice and then execute a file in that directory, nothing else. I don't want to install anything except the compressed archive. Uncompress the archive to a folder - execute a file in the folder - end of story. Somehow this is not possible, but I know it is. I have a program that does it, just can't find info on how to pass the paramerter to execute the one file. This program uncompresses to a 7z.temp folder and then executes the file.There's pleny of advice about passing arguments at the command level but nothing using the windows Parameters: of 7zip.
Martin H Posted June 20, 2007 Posted June 20, 2007 (edited) @SoreGums1. Download 7ZSD.sfx from it's homepage :http://7zsfx.solta.ru/en/2. Copy/paste the following into notepad and save it using 'UTF8' as 'config.txt' :;!@Install@!UTF-8!InstallPath="%Programfiles%\\Portable Firefox"GUIMode="2";!@InstallEnd@!(Change the path as you like, and remember to use double backslashes)3. Make a 7z archive of the contents inside your 'Portable Firefox' folder.4. Place the 7z archive, 7ZSD.sfx and config.txt into the same folder and copy/paste the following into a command prompt :copy /b 7ZSD.sfx + config.txt + archive.7z Setup.exe(Change 'Setup.exe' to whatever you want) @vimUse the above directions + additionally add the following to 'config.txt':RunProgram="hidcon:setup.cmd"Change 'setup.cmd' to whatever. If you don't run a batch file, then remove the 'hidcon:' part(it's used to hide the console window). You can run 'msi' files directly without using 'msistub.exe' or 'msiexec.exe' with this modified 7z SFX installer module(7ZSD.sfx). Btw, if you don't want a fixed extraction path and just want to use the temp folder, and also have the folder with the extracted files deleted afterwards, then remove the following from 'config.txt' :InstallPath="x" Edited July 26, 2007 by Martin H
SoreGums Posted June 21, 2007 Author Posted June 21, 2007 ;!@Install@!UTF-8!InstallPath="%Programfiles%\\Portable Firefox"GUIMode="2";!@InstallEnd@!Nice one thanks I knew it was something to do with the config.txt Is there a list of parameters anywhere, they are hard to find...Thanks again
SoreGums Posted June 21, 2007 Author Posted June 21, 2007 have you tried looking in the 7-zip docs/help/online guides if there is a set commands you can run to achieve what you want?Well in the help file I have with 7-zip here it lists parameters for config.txt but doesn't mention "InstallPath"So if it did I'd have been good to go...
Martin H Posted June 21, 2007 Posted June 21, 2007 (edited) @SoreGumsI am reffering to(and have linked to) the modified version of that module, which includes several knew features...You can find descriptions of all parameters on the modified modules homepage :http://7zsfx.solta.ru/en/ Edited July 26, 2007 by Martin H
vim Posted June 21, 2007 Posted June 21, 2007 (edited) 1. Download 7ZSD.sfx from the first link listed on this russian page :http://7zsfx.solta.ru/downloads_RU.html2. Copy/paste the following into notepad and save it using 'UTF8' as 'config.txt' :;!@Install@!UTF-8!InstallPath="%Programfiles%\\Portable Firefox"GUIMode="2";!@InstallEnd@!(Change the path as you like, and remember to use double backslashes)3. Make a 7z archive of the contents inside your 'Portable Firefox' folder.4. Place the 7z archive, 7ZSD.sfx and config.txt into the same folder and copy/paste the following into a command prompt :copy /b 7ZSD.sfx + config.txt + archive.7z Setup.exe(Change 'Setup.exe' to whatever you want) Use the above directions + additionally add the following to 'config.txt':RunProgram="hidcon:setup.cmd"Change 'setup.cmd' to whatever. If you don't run a batch file, then remove the 'hidcon:' part(it's used to hide the console window). You can run 'msi' files directly without using 'msistub.exe' or 'msiexec.exe' with this modified 7z SFX installer module(7ZSD.sfx). Btw, if you don't want a fixed extraction path and just want to use the temp folder, and also have the folder with the extracted files deleted afterwards, then remove the following from 'config.txt' :InstallPath="x"@Martin H, Thank you, just what I was looking for. I noticed that your Russian link *.sfx is much smaller than the one given by the guide on 7zip installers. I though my immediate install would have been different. I noticed several people modifing the *.sfx using Reshack. I have looked inside. Someone modified the % expanding to be just % and then below their was a word saying Loading in the gray area. Are theri any tuts on the dialouge modifing?Thanks again for your help. Interestingly you helped two people with one "stone" EDIT: I first googled and for some reason the above "babelfish" site never came up. Great find.I also was wondering about the "config.txt" parameters...now if I can just figure out how to useReshack on the SFX file I'll be set. Edited June 21, 2007 by vim
Martin H Posted June 21, 2007 Posted June 21, 2007 Hi again, vim (And btw, you are very welcome, mate!)The moded module i linked to is smaller because it is made for only decompressing LZMA(default 7z archiving algorithm). There are also three other versions of the module on the site for other algorithms. Another reason is that it's the 7ZSD.sfx version, instead of the frequently other used 7zS.sfx version of the module. The difference between the two is that the 7ZSD.sfx version is dynamically linked to MSVCRT.dll, whereas 7zS.sfx is statically linked to it, and so since all newer Windows OSes includes MSVCRT.dll by default in their OS, then there's no reason to use the version of the module which wasts additional space on statically linking to that lib also(unless you want to support legacy OS's also). The moded module has now abandoned the 7zS.sfx version and now only supports the 7ZSD.sfx version. This module isn't UPX'd, because you can't change the icon on a SFX installer made with a UPX'd module, but you can just UPX the module after you have changed the icon, if you care about saving about half of the modules uncompressed size. I'm not sure what it is you're trying to archive with your reshacking question, so i can't answer specifically, however this moded module itself allready includes several parameters for changing the text, fonts, buttons, logos and extraction dialogs etc. For example, you can reshack the normal module to e.g. completely hide the extraction dialog, but with this moded module, then you just add the parameter :GUIMode="2". On the site i linked to earlier, then there is also another section which shows various examples and pictures of how it looks during the installation and then also lists the needed code for 'config.txt' to archieve that result. If what you are after isn't allready covered by the new feature set of the moded module, then i'm affraid that i can't help you, since i don't personally have any other experience with reshacking exe's other than the simple process of changing icons on my selfmade 7z switchless installers.CU, Martin.
SoreGums Posted June 22, 2007 Author Posted June 22, 2007 (edited) Awesome info there and yeah I picked up on the fact that it wasn't the same sfx module used around the place and have made my auto extract pff file and works great on w2k/xp/vista (chose to extract to %appdata% since vista has all the new permissions stuff).I changed the icon and made the dialog show with a short message, works great.Thanks again.edit: after checking out more parameters there is a neat shortcut creation line too which is really good! Edited June 22, 2007 by SoreGums
Martin H Posted June 22, 2007 Posted June 22, 2007 @SoreGumsYou are very welcome, mate Yeah, i'm also really impressed with all the new great parameters that is available now with this version of the module, and indeed, the shortcut creation parameter is indeed simply brilliant Other things which i like the most, is the 'hidcon:' switch for the 'RunProgram=' parameter, so the console window is completely hidden during batch file loading and the ability to run MSI installers directly, without needing msistub.exe or msiexec.exe.CU, Martin.
bledd Posted June 22, 2007 Posted June 22, 2007 this program may help youhttp://freeweb.siol.net/razor256/downloads/EasySFX.zip
vim Posted June 23, 2007 Posted June 23, 2007 this program may help youhttp://freeweb.siol.net/razor256/downloads/EasySFX.zipThanks. It looks like an interesting program. The only problem is, I can't see where I can execute a file that resides inside the *.7z archive like I can using "config.txt". It has to reside OUTSIDE the archive.
bledd Posted June 23, 2007 Posted June 23, 2007 that can create an exe installer compressed with 7zip
asphyxia Posted June 23, 2007 Posted June 23, 2007 What is the switch for 7-zip through which i can install 7-zip silently but with progress bar shown.
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now