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!

Mattscott
Posts: 1
Joined: Mon May 18, 2015 12:49 pm

component condition doesn't work

Hello,

I would like to install a different file version depending on the presence of a file next to my install exe file.
So far with the doc help I have gone to this:
- I have created an install property CRM_V8 with default value to 0
- I have set a custom action of type inline script like this:

Code: Select all

Set objFSO = CreateObject("Scripting.FileSystemObject")
If objFSO.FileExists(Session.Property("SETUPEXEDIR") & "CRMobileForCRMv8.txt") Then
		Session.Property("CRM_V8") = "1"
End If
- I have put each version of my file in a separate folder and set the component condition one with CRM_V8 = "1" and one with CRM_V8 = "0"
- I have put my custom action just after CostInitialize in action sequence

But whatever if the file is present or not, the same file is copied.
I have checked in the log, the property is correctly set but it changes anything.

Here is a part of this log:
Début de l'action: 14:53:39: ExecuteScriptCode.
MSI (s) (8C!0C) [14:53:39:723]: PROPERTY CHANGE: Modifying CRM_V8 property. Its current value is '0'. Its new value: '1'.
L'action s'est terminée à 14:53:39: ExecuteScriptCode. Valeur de retour: 0
MSI (s) (8C:0C) [14:53:39:726]: Skipping action: AI_PREPARE_UPGRADE (condition is false)
MSI (s) (8C:0C) [14:53:39:726]: Doing action: InstallValidate
Action 14:53:39: InstallValidate. Validation de l'installation
Début de l'action: 14:53:39: InstallValidate.
MSI (s) (8C:0C) [14:53:39:728]: PROPERTY CHANGE: Deleting MsiRestartManagerSessionKey property. Its current value is 'b803ee5a00ac55439b6c108bda484226'.
MSI (s) (8C:0C) [14:53:39:728]: Feature: MainFeature; Installed: Absent; Request: Local; Action: Local
MSI (s) (8C:0C) [14:53:39:728]: Component: CRMobile.dll_2; Installed: Absent; Request: Local; Action: Null
MSI (s) (8C:0C) [14:53:39:728]: Component: CRMobile.dll_1; Installed: Absent; Request: Local; Action: Local

Thanks for your help.
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: component condition doesn't work

Hello,

To closer investigate your installation scenario, can you please send us the .AIP (project file) and a verbose log of the installation to support at advancedinstaller dot com so we can investigate them?

If you cannot share with us your project file, then you can try to isolate the behavior in a buildable sample (.aip + its referenced files) which we can build and test on our side.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Building Installers”