Announcement

Collapse
No announcement yet.

Extract file from setup at runtime (lua script)

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Extract file from setup at runtime (lua script)

    Hi,

    I'm looking for a way of extracting files from the actual setup when setup is running (separate from the setup install and without using primer files) . I'm getting the file list included in the setup with SetupData.GetFileList(ARCHIVE_LIST) and traversing trough each file in the table, but I don't see any way of extracting files on my own lua script from the actual setup and save it/decompress it to a folder. Is this possible? Or do I need to find a way around, like install them all first and the use File.Copy/Install and copy them where I need?



    Thanks.

  • #2
    Why would you need to do this?
    AutoPlay Media Studio 8.5 is Windows 10 compatible today!

    Comment


    • #3
      My Application can run as a portable from USB as well as installed (with SetupFactory). And I need to be able to just update the one present on USB (ie install in on USB without further doing registry changes, shortcuts, uninstall and the like). So, my scenario sounds like this: from my app I have a way to check for updates and download+run the setup. If my app runs from USB as portable, I'll basically launch the downloaded setup with a parameter to copy the setup file to the USB where my app is installed. Sounds simple and I handled all of that, but unfortunately I'm stuck because I can't extract the files from the setup without actually installing it... The only workaround I see is ditch the setup and download a zip of my app that is in a portable way (or silent install and then copy over to USB and silent uninstall, but that doesn't really sound good to me). But it was way much more simpler if I could just extract the files from the setup so that I didn't had to manage both the setup and a separated zip with my app...

      Thanks

      Comment


      • #4
        With a detection of the current install, you would be able to simply update files without running the whole installation again. You can control what parts of the setup should be skipped - if for some reason you do not want to add or change registry entries, you can skip this. There is no problem in having a single setup - it could handle both fresh installs and upgrades, no need for decompressing files manually...

        Ulrich

        Comment


        • #5
          Thanks for that, sounds good. But how can I exactly update just the files without actually creating an uninstall and update registry with uninstall data or no shortcuts? My setup has the uninstall option and shortcut creation and that should stay on unless the current install is not available. So, my workflow should be like this:
          1. setup is run with a parameter (/USBUPDATE) passing the USB drive letter (destination of copy files from setup)
          2. my setup parses the /UPDATEUSB on startup action extracting the drive letter
          3. setup copies the files to that drive letter skipping uninstall creation (how can I do this and skip the uninstall creation? ie install/copy files from setup to a folder without creating additional uninstall entries in registry)

          But I'm stuck at step 3, since my setup should work as a regular one that creates the uninstall info as well as shortcuts when it's not run with the /USBUPDATE (ie when just launched without the parameter)

          If I had a way to just extract the files from current setup, then that would have been easy. As I just check for that parameter on startup, copy/extract the setup files on the USB and then abort the setup without actually creating the uninstall in the registry or any other shortcuts.

          Thanks.

          Comment

          Working...
          X