View Full Version : Include one installation in another
PodHunter
02-19-2020, 03:32 AM
Suppose that I have two products, A and B. Product B has its own SetupBuilder B installation. Product A has its own SetupBuilder A installation. Product B uses the services of Product A. So, I want Product B's installation to install Product A.
Can SetupBuilder B include SetupBuilder A, or does SetupBuilder B have to include all the stuff that SetupBuilder A uses?
lmodern1878
02-20-2020, 09:32 AM
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=1VIEO5_XYTCmXe5W-znKEy9iVXjjIBLAh
Hope this helps:
Carly
linder
02-21-2020, 06:57 AM
Hello,
you have several options. Before I go into detail, what's the size of your SetupBuilder B setup.exe?
Friedrich
PodHunter
02-26-2020, 05:25 AM
Hello,
What's the size of your SetupBuilder B setup.exe?
Friedrich
About 23Mbyte
PodHunter
02-26-2020, 05:26 AM
Thanks for your comprehsive answer!
linder
02-26-2020, 06:47 AM
Hello,
sorry, I meant the size of the SetupBuilder A installer.
If it is a similar size, you can include the installer for Product A in your Product B installer. But you have again several options.
What about the following (see attached screenshot). You check if Product A is already installed. If this is not the case, extract the installer for Product A to the temporary folder. Then execute (run) the installer in silent mode (and wait for its termination). After the installation of Product A, remove the installer from the temporary folder and continue with your real Product B installation.
What do you think? If you need help with this method, just let me know.
Friedrich
lmodern1878
02-26-2020, 09:51 PM
Great minds think alike :D. See my attached project above i just missed a step.
I can’t believe I actually saw that answer coming :). I’ve been using setup builder since I took a class on v6.2 and cannot believe something I never use actually came back to me from that class wow!
Powered by vBulletin® Version 4.2.5 Copyright © 2024 vBulletin Solutions Inc. All rights reserved.