Menu

How to create self extracting zip with static target folder?

Help
barbarin
2016-11-07
2016-11-08
  • barbarin

    barbarin - 2016-11-07

    I am trying to make a silent installer using the command line interface.
    Using the 7-ZIP SFX Maker.exe,
    ExtractPath tab "Allow user to change path" unselected.
    General tab->Extraction Path=C:\Program Files\MyCompany\MyProductSuite

    Using the command line interface, I am trying to specify -oOutput Directory to specify the extraction path but that seems to have no effect on my archive.

    What options do I need to pass in order for my "my-product" directory to be zipped up from local directory. but when the install is run it will self extracted into the directory I specify (c:\Program Files......) AND for the install to be silent / no prompts?

    This is the CLI I was trying:
    7z.exe a my-product-install.exe -o"C:\Program Files\MyCompany\MyProductSuite" -sfx my-product

     
  • Joshua Maeir

    Joshua Maeir - 2017-07-13

    Hi there,

    This is exactly the issue I am dealing with now as well.
    I can deal it not being silent, however I really want the files to be extracted in to a particular directory.

    I suppose I can work around it by using 7zSD and a config file that will run a batch file to move the extracted files in to my desired location... BUT it seems that one should be able to do what the original poster is trying to do.

    Any comments? Suggestions? Solutions?
    Thanks in Advance!

    -- Josh

     
  • Joshua Maeir

    Joshua Maeir - 2017-07-13

    bah!

    From the documentation:


    -o (set Output directory) switch
    Specifies a destination directory where files are to be extracted.

    This switch can be used only with extraction commands.


    in short, this cant be done with the regular sxf option.
    I tried to use the sxf for installers like so:

    Config.txt:

    ;!@Install@!UTF-8!
    InstallPath="C:\Users\Public\Documents\Covaris"
    ;!@InstallEnd@!

    But its running and bringing up an error msg that it cannot find setup.exe....
    It seems that you cant just extract the files that way.

     

Log in to post a comment.

MongoDB Logo MongoDB