Menu

Working directory for an '7zS.sfx' packed application

Help
btk123
2015-03-17
2015-03-26
  • btk123

    btk123 - 2015-03-17

    I am packing an application into a self-extracting archive using the '7zS.sfx' module. This application writes settings to a configuration file in the current working directory. When not placed in a self extracting zip, this configuration file is placed in the same folder as the executable. However when the application is executed from within the self-extracting executable, the working directory appears to be the temporary folder to which the archive was extracted. The configuration file is placed in this temporary folder and is deleted when the application terminates.

    In order for this configuration file not to be deleted, I want to place it in the same folder as the self-extracting archive. Is it possible:
    1. not to change the working directory when running the executable or
    2. for the application to know the location of the self-extracting archive?

    If needed, I am able to modify the packed application.

     
  • btk123

    btk123 - 2015-03-26

    Just inspected the source of '7zS.sfx' myself and found out this can't be done without modifying '7zS.sfx' itself.

     

Log in to post a comment.