Hi,
If you need to use the modified install location you can try using a
custom action. Basically, the custom action should do this:
- retrieve the value of the APPDIR property (the installation path)
- eliminate the last folder name in the path
- add the custom folder name in the path
- save the new path into the custom property used by the property-based folder
Here is some sample VBScript code:
Code: Select all
Dim origPath
Dim customPath
Dim tokens
' get the install path
origPath = Session.Property("APPDIR")
tokens = Split(origPath, "\")
' initialize the path lenght and the custom path
Dim index
Dim parentLenght
parentLength = UBound(tokens) - 2
customPath = ""
' obtain the main install path
For index = 0 To parentLength
If Not(tokens(index)) = Empty Then
customPath = customPath & tokens(index) & "\"
End If
Next
' add the custom folder
customPath = customPath & "Product2"
' set the property with the custom path
Session.Property("CUSTOM_PATH") = customPath
This code can be pasted into a .VBS file which can be added as an Attached custom action under "InstallExecuteSequence" -> "Begin". It will set the "CUSTOM_PATH" property to the original installation path, but with "Product2" instead of "Product1".
Another approach would be to use a
custom dialog which allows the user to
browse for the two folders.
Regards,
Cosmin