No announcement yet.

Downloading and Executing a Second Setup File

  • Filter
  • Time
  • Show
Clear All
new posts

  • Downloading and Executing a Second Setup File


    I've used Setup Factory 7.0 for awhile and use it to build simple local installers for our training applications. Recently we've changed our product a bit and it requires the installation of two separate programs. One is a small application that runs the training and the second is a larger file that contains the installation of the media for the training itself. Since the media changes based on the course, I want the application and the media to be separate installations so I can use the same application for all courses.


    Here's what I'd like to do and I'm not sure what the best way to do this is, or really even how to do this:

    1. When SETUP1.exe is run - Check to see if a folder at a specific location exists (I know how to do this part).

    2. If the folder does NOT exist (I'll assume this means it's not installed) then go out to the web and download the SETUP2.exe installer file (this one is much smaller).

    3. Once the file is downloaded, then LAUNCH SETUP2.exe and let it install the application.

    4. When SETUP2.exe is complete, move on to let the rest of SETUP1.exe run, which will install the media included in the original setup file.

    5. When it's all finished, both applications will have been installed and all the user will have to do is open the first setup to do it. This will allow me to update SETUP1.exe seperately of SETUP2.exe.


    So my question is how do I perform this? What is the best way to handle this in Setup Factory 8 (I just upgraded)? Using HTTP download? I am also getting the FTP plugin today as well.

    Any advice, sample code on how it might work, or suggestions in general would be greatly appreciated.


  • #2
    Hello Brian,

    the method you outlined seems appropriate, but I have a few thoughts.

    In step 1 you say that you check for a folder. Unless you are not giving your customer the choice of setting the deployment folder at all, I wouldn't go this way. A more secure way would be checking in the registry for the installed software - of course you would have to set that info at some moment. Remember that there are different versions of Windows, and different languages, and that you shouldn't suppose to find a certain name of folder on a certain drive. One can have another language (which doesn't feature the "Program Files") or the user could have installed the application on a different drive with more free space, just for example. It wouldn't be practical to search all disks for the former installation.

    In step 2, you say that the second setup is much smaller. If this is true, wouldn't it be easier to simply include the smaller setup in the bigger one, and have it run only when needed (step 1)? This would allow offline installs, and repeated installs on several computers after a single download...

    For downloading files, I would always prefer FTP, as it is more robust and appropriate for this kind of traffic than HTTP. I made an example project recently, which I am attaching here. There is still much room for improvements (like the screen with the progress bar, for example), as I made this just to confirm that the FTP plugin would work correctly in SUF 8.0 and that I would be able to display some download progress. But I hope that someone might find it useful as a starting point for a new project.


    PS: To the moderators: It is currently not possible to upload *.sf8 files.
    Attached Files


    • #3
      Hi Ulrich,

      Thanks for your help - I'll check out this project and see if it solves my issues, I appreciate your help!!!

      Just to clarify:

      1. I AM controlling the location of the folder that the person installs to, it is specific and must be installed in the right place for my other application to find it and know it's there - so detecting a folder installed at a specific place, in this case might be somewhat accurate - although I agree with you ,not AS accurate as other methods - so I might check into them. I suppose I would need to write a registry entry and then check that entry to make this work? I can look at that. Basically, though, if the folder isn't in the right place, then most everything isn't going to work correctly (doesn't matter WHERE the folder is, but it must be INSIDE the same folder as the courses to work).

      2. The reason I don't want to include the first setup in the second setup is because I want to be able to update them independently of each other. For instance it is much more likely that the setup I DOWNLOAD will be updated regularly whereas the other setups (and there will be many) won't be updated regularly. This would mean that every single time I made a tiny update to the app, rather than simply updating 1 application and setup file, I would have to update every single setup I had built - since it includes that one as well.

      Unless I'm not understanding things correctly.



      • #4
        I was wondering if there is help on the FTP component. What methods are programmed into the FTP item? Looking to know how to add user name and password since site is not allowing anonymous login.


        • #5
          The FTP plugin comes with a help file in HTML format. You can access it using the "Plugin Help" button, as with any other plugin.

          Click image for larger version

Name:	SCRN-2023-02-10-01.png
Views:	119
Size:	24.6 KB
ID:	309933

          Alternatively, in the script editor, you can call the help for any command, by clicking "Click here to learn more about this action". This will also open the same HTML help file.

          Click image for larger version

Name:	SCRN-2023-02-10-04.png
Views:	47
Size:	12.4 KB
ID:	309934