Hi Clemens,
I'm afraid that this is not supported by Windows Installer.
However, something similar can be done with this approach:
- create a custom action which appends the version to the installation path
- go to the
Custom Actions page and add it under "UI Custom Actions"
- create a ScriptInline custom action which has the "Script Text" field set to something like this:
Code: Select all
MsgBox "The installation path has been modified automatically to include the product version:" & vbcrlf & Session.Property("APPDIR"),64
- go to the
Dialogs page and select the "Next" button on the "FolderDlg" dialog
- add two DoAction published control events which run your custom actions
- make sure these control events are above the "SetTargetPath" control event
Basically, the first custom action should append the version to the installation path and the second one will show a message to the user. Here is a sample custom action which appends the "ProductVersion" property to the installation path:
Code: Select all
' get the value of APPDIR
dim appdir
appdir = Session.Property("APPDIR")
' eliminate the trailing backslash
If Right(appdir, 1) = "\" Then
appdir = Left(appdir, Len(appdir) - 1)
End If
' append the Product Version
appdir = appdir & " " & Session.Property("ProductVersion") & "\"
Session.Property("APPDIR") = appdir
Regards,
Cosmin