We’re moving our forums to a new platform.

You can still browse and search existing topics, but you can no longer create new topics or post replies.

For questions, technical issues, or feature requests, please don’t hesitate to contact our support team at support@advancedinstaller.com.

Thank you for your understanding!

sbrown_el
Posts: 20
Joined: Wed Dec 05, 2012 4:07 pm

Silent Install, conditional features to install determined too late

I have a working UI based installer under v13.1 that performs run-time determination of what features to install, and then sets the properties SERVER_INSTALL and/or CLIENT_INSTALL (as part of the Dialogues Stage, after Path Resolution) as appropriate to the requirements of the server it is installing to.

As a UI based installer, this works. The install log shows:

Code: Select all

//GUI STAGE
ReadINI : 10/3/2016 1:48:27 PM setting session property SERVER_INSTALL to 1
.
.
//INSTALL STAGE
MSI (c) (A0:28) [13:48:54:145]: Feature: Client; Installed: Absent;   Request: Local;   Action: Local
MSI (c) (A0:28) [13:48:54:145]: Feature: Server; Installed: Absent;   Request: Local;   Action: Local
MSI (c) (A0:28) [13:48:54:145]: Feature: Common; Installed: Absent;   Request: Local;   Action: Local
When running as a silent install (/exenoui /qn) , the feature requirements are being resolved before the file sets are copied to the destination, and as such, the VBS custom action which sets the properties does not exist to run until after the features are resolved. This results in an incorrectly resolved feature base.

Code: Select all

//INSTALL STAGE
MSI (s) (8C:80) [12:23:15:127]: Feature: Client; Installed: Absent;   Request: Null;   Action: Null
MSI (s) (8C:80) [12:23:15:127]: Feature: Server; Installed: Absent;   Request: Null;   Action: Null
MSI (s) (8C:80) [12:23:15:127]: Feature: Common; Installed: Absent;   Request: Local;   Action: Local
.
.
ReadINI : 10/3/2016 12:23:16 PM setting session property SERVER_INSTALL to 1
The VBS custom action does not seem to be able to run until the files get copied (after Path Resolution in Install stage) resulting in the install happening without knowing what features are required.

I realize that there is an "ADDLOCAL" option to pass to the MSI - but that requires knowing the runtime requirements BEFORE runtime. Obviously I can't tell the future... it needs to be resolved at run time.

Is there anything that can be done to push the execution of the VBS higher up the INSTALL stage, so that the features are determined at run time prior to copying of files?
sbrown_el
Posts: 20
Joined: Wed Dec 05, 2012 4:07 pm

Re: Silent Install, conditional features to install determined too late

If I pass parameters to the silent install, as such

Code: Select all

Setup.exe /exenoui /qn /l*V ".\install.log" SERVER_INSTALL="1" CLIENT_INSTALL="1"
I can get the installer to process the features

Code: Select all

MSI (s) (94:58) [13:32:30:722]: Feature: Client; Installed: Absent;   Request: Advertise;   Action: Advertise
MSI (s) (94:58) [13:32:30:722]: Feature: Server; Installed: Absent;   Request: Local;   Action: Local
MSI (s) (94:58) [13:32:30:722]: Feature: Common; Installed: Absent;   Request: Local;   Action: Local
However, this requires future knowledge of the system being installed.

(It also doesnt exactly mimic the UI based install... the "Request: Advertise; Action: Advertise" is different from "Request: Local; Action: Local", and is likely to make our QA group suspicious of changes in the install process.)

Running equivalent processing outside of the installer means duplication of code, with a corresponding duplication of maintenance, but more importantly, an opportunity for the code to become out of sync between the 'in-install" and "pre-install" versions. It is much more preferable to have the single, proven codebase to run inside the installer.

So again I ask - is there any way to run the script higher than between Install Stage/Paths Resolution Step and Install Stage/Preparing step?
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: Silent Install, conditional features to install determined too late

Hi,

Sorry for the delayed reply.

A VBS custom action can be executed at any point of the installation. To achieve this you only need to add a new "Launch attached file" predefined custom action and select the VBS file that should be executed, then move that custom action at the point you need it.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
sbrown_el
Posts: 20
Joined: Wed Dec 05, 2012 4:07 pm

Re: Silent Install, conditional features to install determined too late

We've continued to have issues getting this to function properly. Instead we've resorted to passing property values on the command line to trigger required processing, as such

Code: Select all

Setup.exe /exenoui /qn /l*V ".\install.log" SERVER_INSTALL="0" CLIENT_INSTALL="1" REBOOT=FORCE
This is the only way we've been able to get a functioning silent install package.

The only quirk in this method is that the "Client" feature always comes up as "Adversised" rather than "Local" in the log. Not really sure why this is the case, but it doesn't seem to have hurt anything that we can see as of yet.
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: Silent Install, conditional features to install determined too late

Hi,

I'm glad to got this working.

I'm not sure why that feature is set to "Advertised" when running the package in silent mode, but this should not be a problem.

Just let me know if there is anything else that I can help you with.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Building Installers”