4

I have a written a setup script for my own Windows EXE using InstallShield Premium 2012. My EXE, however, ultimately relies on the presence components provided by a Microsoft EXE called AccessDatabaseEngine.exe.

In order to run this AccessDatabaseEngine.exe executable with my installation, I added it as an embedded binary resource then used the Custom Action Wizard to launch AccessDatabaseEngine.exe as "Deferred Execution in System Context" as an "After PublishFeatures" Install Exec Sequence. This worked as expected: The AccessDatabaseEngine.exe launches after my Setup completes most of its work.

However, once I see the UI for the AccessDatabaseEngine.exe and acknowledge its UI prompts, I see "Error 1500", which states that another installation is in progress.

I understand that two MSI packages cannot be running at the same time unless you tweak the registry to allow it, which I do not want to do on my customers' workstations, which are Windows 7 32-bit machines.

I would like to successfully implement one of these options:

OPTION ONE: Have the user launch my Setup.exe program, which will at some point launch the Microsoft AccessDatabaseEngine.exe without generating any error message. I just don't know how to do that without causing the Error 1500 to appear...

OPTION TWO: If it's possible to somehow wrap my Setup.exe along with Microsoft's AccessDatabaseEngine.exe into a single EXE, then I could provide my end users with that single EXE and it would first execute the embedded Setup.exe and, once that's done, it would execute AccessDatabaseEngine.exe.

I realize that I could implement OPTION TWO as a .bat (batch) file, but I want to deliver only a single EXE to my end users and have that single EXE install everything needed for my software to operate properly.

Any ideas?

Jazimov
  • 12,626
  • 9
  • 52
  • 59

2 Answers2

2

What you describe here is exactly what InstallShield's prerequisites are designed for. Launch the prerequisite editor from the Tools menu and add files, command lines, and conditions that carry, install, and detect the installed footprint of the AccessDatabaseEngine.exe; then use the redistributables view to include that new prerequisite in your project.

Once you've done this correctly, InstallShield's setup launcher will check to see if the prerequisite footprint is present, and, if not, it will run the prerequisite as described. Since this is done before it launches the main .msi file, it avoids having two .msi files installing at the same time.

See Defining InstallShield Prerequisites, Creating an InstallShield Prerequisite, and Setting Installation Conditions for an InstallShield Prerequisite in the help for more details. For defining where these end up in your built installer, see Specifying the Run-Time Location for InstallShield Prerequisites at the Release Level or Specifying a Run-Time Location for a Specific InstallShield Prerequisite. Note that when dependencies of a prerequisite are added, they often use the release-level setting, so unless you really want a mix of locations, you're best off specifying this in the release.

Michael Urman
  • 15,737
  • 2
  • 28
  • 44
  • Thanks--it is an acceptable solution but the AccessDatabaseEngine.exe ends up in a folder as a separate EXE and (ideally) I wanted a single Setup.exe with no external dependencies; also, I have a password on my Setup.exe (Direct Editor | ISRelease | Password column), and the password prompt appears before Setup.exe appears and then again before the prerequisite AccessDatabaseEngine.exe is launched (ideally I would like the pw prompt to appear only once). At this point I would be open to a third-party tool that might wrap the Setup.exe and the folder with the other exe if such tool exists. – Jazimov Mar 09 '16 at 20:53
  • I'm not sure about the password, but for the external file, you can set the location either in the right click properties of the redistributables view or on the release configuration in the releases view. – Michael Urman Mar 09 '16 at 23:02
  • As far as external file, the redistributables properties let you choose either a local path or a web location (which is not an option for me due to client firewalls and limited proxies); release configuration lets me change the name/location of the AccessDatabaseEngine.exe but I can't see a way to embed it. Ideally, I'd like to add the AccessDatabaseEngine.exe as a binary resource and then have the Setup program extract it so it could execute it as a prerequisite. That would let me provide a single setup.exe file to my client. – Jazimov Mar 09 '16 at 23:56
  • Perhaps see http://stackoverflow.com/a/36059949/89999 where I describe setting the prerequisite's location in slightly more detail. This is distinct from specifying where the prq gets its files; it's how the setup includes the prq. – Michael Urman Mar 18 '16 at 12:13
  • I appreciate but I don't see how this helps. The Microsoft EXE still ends up as a separate EXE in a folder along with my product's setup.exe,,, – Jazimov Mar 18 '16 at 21:30
  • Well, the prq didn't put it there unless you mean a ISSetupPrerequisites folder. Is it in your DISK1 folder (support files view)? – Michael Urman Mar 18 '16 at 22:08
  • Yes, in my DISK1 folder I have setup.exe and a folder called ISSetupPrerequisites. Under ISSetupPrerequisites I have a folder called {C25DB6CC-71C5-48C2-BEE9-6286D020CB04} that contains the Microsoft setup file, which is called AccessDatabaseEngine.exe. – Jazimov Mar 21 '16 at 06:00
  • ISSetupPrerequisites and its subfolders are only generated when one or more prerequsites are set to "Copy from Source Media". Either change their settings individually, or override them all with the Releases view setting, to use "Extract from setup.exe". – Michael Urman Mar 21 '16 at 11:39
  • I went to Application Data | Redistributables, found my prerequisite listed there, clicked on properties, and changed it from "Copy from Source Media" to "Extract from setup.exe". When I rebuilt, the folder and the separate AccessDatabaseEngine.exe still gets generated (yes, I'm sure--did a build twice to new target folders). Oddly, the Releases view still shows a folder under DISK1 and I can't see any way to remove them (right clicking doesn't work, etc.). Admittedly, this InstallShield program is frustrating me but I hope you will continue to try to help. – Jazimov Mar 22 '16 at 00:30
  • Perhaps it's a dependency? See last sentence of my new edit. – Michael Urman Mar 22 '16 at 12:10
  • No, not a dependency. The only time I ever refer to AccessDatabaseEngine.exe (ADE.exe) is in Redistributables. As stated above, it is listed in Releases--how can I delete it from there? I did a Find in Direct Editor and no ADE.exe is referred to there. PRQ for the DBE redist has its properties still set to "Extract from setup.exe" and its ISSetupLocation - (I2) is equal to 1. I really don't understand why this would be so complicated. Why would InstallShield make it so difficult to determine why a particular file is getting built into the output??? – Jazimov Mar 22 '16 at 13:08
0

Apparently there are TWO settings that determine if a prerequisite ends up in its own, separate folder (a release folder below the folder that contains setup.exe), or if it gets embedded into a single setup.exe file.

The first setting is available in the Installation Designer under Application Data | Deliverables. Find your PRQ prerequisite listed there with a check mark, right click it, and view Properties. You will see a Build Location dropdown--one of the options is Extract From Setup.exe. That's the way mine was set.

But then there is SECOND setting, and that's in the Installation Designer's Media section, under Releases. In my project, I had a Releases root, then a PROJECT_ASSISTANT branch, then a SINGLE_EXE_IMAGE branch. I left-clicked SINGLE_EXE_IMAGE and viewed its property sheet. In that list is an entry near the bottom of the list that says Setup Prerequisite Location. Double-click the right column (where its value is listed) and you will see a selection there that also says Extract From Setup.exe.

This second setting OVERRIDES the one specified in the deliverables section, and that's why it wasn't working as specified in the prerequisite setting. That's because I was using the "Copy From Source Media" setting.

So if you have multiple prerequisites and you want all of them to be included in the setup.exe then it's okay to use the Extract From Setup.exe settings. But if you prefer to configure where the prerequisite ends up, then choose the Follow Individual Selections options in the Releases' Setup Prerequisites Location section and then ensure that you've selected the correct option for each of your prerequisites.

Even if others had suggested doing this in previous answers, those explanations weren't clear to me and I wasted a lot of time before ultimately discovering what's actually going on.

Jazimov
  • 12,626
  • 9
  • 52
  • 59