Hello,
How to do I get AI to install my instances as follows
Initial Install c:\manufacturer\Product Name - 'Company A'
1st Instance c:\manufacturer\Product Name - 'Company B'
2nd instance c:\manufacturer\Product Name - 'Company C'
Unfortunately our support for multiple instances doesn't permit this scenario, as the first instance (Instance #0) will always be installed in a path that doesn't include the Instance ID.
Starting with the second instance (Instance #1) the InstanceId is appended to the APPDIR.
In order to overcome this limitation please follow the steps:
1. Create a new "Execute inline script code" custom action without sequence, containing the following code:
filePath = Session.Property ("APPDIR")
'if file is found on the target machine
If Len(filePath) > 0 Then
'retrieve folder path
folderPath = Left ( filePath, InStrRev (filePath, "\") - 1)
'set the installation path with this value
Session.Property ("APPDIR")= folderPath & " " & "Company A"
End If
2. Create a new execute custom action published event on "Next" button from "WelcomeDlg" for the above custom action. You should condition its execution by the following condition:
ProductName = "Your Application"
Where "Your Application" represents your actual product name. This condition ensures that the custom action is executed only at the installation of the first instance. Starting with the second instance, the InstanceId will be appended to the ProductName, thus the condition will become false.
3. Go to "Multiple Instances" page and create two new instances. Rename them "CompanyB" and "CompanyC"
Please take a look on the attached sample configured for your scenario.
Best regards,
Sorin
FOLLOW US
Get the latest news in Application Packaging