cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Cygnusx1
Level 8

vbscript: Property vs. Session.TargetPath

Can anybody tell me why Property("TempFolder") works and Session.TargetPath("TempFolder") does not?
The CA is well after file costing.
~simple vbscript ca:
Dim sDir
msgbox Property("TempFolder") & vbcrlf & Session.TargetPath("TempFolder")
Labels (1)
0 Kudos
(3) Replies
MichaelU
Level 12 Flexeran
Level 12 Flexeran

That does sound surprising; are there any hints in a verbose MSI log? Is there any reason you cannot just use the property instead of the directory's TargetPath?
0 Kudos
Cygnusx1
Level 8

I can use Property but the script should operate with Session.TargetPath.
You see, I am converting all my Wise packages to Installshield and now I have to edit all my CAs that contain TargetPath.
0 Kudos
MichaelU
Level 12 Flexeran
Level 12 Flexeran

That's fair; I totally understand why you wouldn't want to make that change. However the VBS support represented in the Session object is part of Windows Installer itself, and unless there's a significant difference in how the directories are structured between the Wise package and the InstallShield one, or in the sequencing of your custom action (mainly whether it's before or after CostFinalize), I would not have expected the behavior to change.
0 Kudos