Jump to content

Welcome to MSFN Forum
Register now to gain access to all of our features. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, post status updates, manage your profile and so much more. This message will be removed once you have signed in.
Login to Account Create an Account


Photo

7z SFX Specifying the extract path

- - - - -

  • Please log in to reply
4 replies to this topic

#1
prometheus0ne

prometheus0ne
  • Member
  • 1 posts
  • OS:Windows 7 x64
  • Country: Country Flag
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?


How to remove advertisement from MSFN

#2
allen2

allen2

    Not really Newbie

  • Member
  • PipPipPipPipPipPipPip
  • 1,812 posts
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.

#3
Geej

Geej

    Senior Member

  • Member
  • PipPipPipPip
  • 635 posts
  • OS:XP Pro x86
  • Country: Country Flag
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

#4
allen2

allen2

    Not really Newbie

  • Member
  • PipPipPipPipPipPipPip
  • 1,812 posts

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).

#5
Geej

Geej

    Senior Member

  • Member
  • PipPipPipPip
  • 635 posts
  • OS:XP Pro x86
  • Country: Country Flag
@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 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users



How to remove advertisement from MSFN