Welcome to MSFN

Register now to gain access to all of our features. Once registered and logged in, you will be able to contribute to this site by submitting your own content or replying to existing content. You'll be able to customize your profile, receive reputation points as a reward for submitting content, while also communicating with other members via your own private inbox, plus much more! This message will be removed once you have signed in.


Sign in to follow this  
Followers 0
prometheus0ne

7z SFX Specifying the extract path

5 posts in this topic

I have been playing with 7zip SFX module and I'm looking for a way to give the executable a path to extract to, and do so silently.

Does anyone know how I might achieve this?

0

Share this post


Link to post
Share on other sites

To my knowledge, there isn't any command line switch to specify the folder but there is a way to do almost the same: you need to use the installpath with an environment variable. For example, you set it to %7zipsfxinstallpath% when creating the sfx; next, before auto-extracting it, you just need to do a set 7zipsfxinstallpath= to the value you wanted before launching the 7zip sfx.

0

Share this post


Link to post
Share on other sites

try this sample config

;!@Install@!UTF-8!
GUIMode="2"
OverwriteMode="0"
InstallPath="%programfiles%\\KLOCKS"
Shortcut="T,{%%T\\KLOCKSNumOn.exe},{},{},{NumLock On},{numlockon}"
;!@InstallEnd@!

It will put whatever files you have wrapped up to %programfiles%\Klocks when you run it silently

0

Share this post


Link to post
Share on other sites

try this sample config

;!@Install@!UTF-8!
GUIMode="2"
OverwriteMode="0"
InstallPath="%programfiles%\\KLOCKS"
Shortcut="T,{%%T\\KLOCKSNumOn.exe},{},{},{NumLock On},{numlockon}"
;!@InstallEnd@!

It will put whatever files you have wrapped up to %programfiles%\Klocks when you run it silently

Of course using %programfiles% make sense if you want to extract always in "c:\program files" but it lose ability to extract to a complete different folder if needed. Also i wouldn't put the program folder (in your example KLOCKS) in the installpath variable and create the archive with the folder (not only with what is inside the folder).

0

Share this post


Link to post
Share on other sites

@allen2

The Op just want an example "a way to give the executable a path to extract to, and do so silently."

I just provide some sample for him. Not a specific config.txt

He can always adjust at his end what he wants etc etc etc

Cheers

0

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0

  • Recently Browsing   0 members

    No registered users viewing this page.