Results 1 to 7 of 7

Thread: Include one installation in another

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #2
    Join Date
    Apr 2015
    Location
    CA, Unitedd States
    Posts
    130

    Lightbulb Re: Include one installation in another

    Hello:

    I saw this and thought a couple of things that might work as follows:
    1. Put product A’s already compiled setup.exe in product B’s installer as a “support file” that way it will be available in a temporary directory at install time.
    2. Do a find files action (set a new variable to be blank (always assume the file will not be found), in the script editor insert an If file/folder..." statement and give it a full path to a file that is installed with product A and you can guarantee WILL NOT move (e.g. an empty .txt file in %windir%, an always install hard-coded path from A (e.g. C:\install-support\instll.txt attached to the "always install" feature or something like that so if user changes features or chooses a non-standard install directory, you know that file will 100% be there until the user uninstalls A from their machine) to check if A is already installed. Select the "file does exist option" then set it to 1)
    3. Add a line if %productA_inst% does not equal 1 then use a run program statement for setupA.exe in %TMPDIR% and be sure to set the command line field to /S so the user doesn't see any input.

    =EDIT:
    I’ll get together a test project to see if my solution is correct but I’m sure there’s a better way that’s just one I thought up

    Just put together a test project and ran it on my local computer to see if I was right, and yes I was right at least this is one solution. I'll post a link to where you can download it from Google Drive. This ZIP has the spb files so you can see how it works, two txt files one is used in the compiled installer for demo A and one is used for demo B, and the final installers. I've also included a read me 1st txt file for your convenience which I'll paste below.

    I've already virus checked this with windows defender but you should follow best practices and run your own virus scans if you feel the need to and also look at the spb projects to validate what I say is true of the code in the final exe files


    [Here's the ReadMe.txt]
    What's Included:
    In This folder You'll find:
    1. \scripts folder: contains sample SetupBuilder Scripts for a custom pre-requisite (Product A) and its dependency (Product B)
    2. \sources folder: contains folders relating to the sample projects. "Product A" contains a blank .txt file and installs to C:\DemoProduct and "Product B" contains a test file that just says it is the result of the install and its last modified date/time. Both Products register with add/remove programs in control panel so they can be independently reoved.
    3. \Installers folder: contains the finished installers for both A and B so you can try them out.

    How do I use This?

    1. To see the installation scripts open either file in SetupBuilder and mavigate to script editor. Product B makes use of comments to see what is happening where, product A is just a simple setup that doesn't need any comments as it was completed only using the visual mode with no custom actions
    2. To see the concept in action you can either run SetupB.exe first then run SetupB.exe, or to see the dtection in action simply just run setupB.exe and it will run SetupA.exe if it cannot find KeyFile.txt
    [end read me]

    Google Drive Download (Custom_Pre-Requisites.zip) Link: https://drive.google.com/open?id=1VI...KEy9iVXjjIBLAh

    Hope this helps:
    Carly
    Last edited by lmodern1878; 02-20-2020 at 09:59 AM. Reason: tested solution and included a google drive link to ZIP file containing example project

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

  • You may post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts
  •