Gentlemen,
need help with Visual Stidio installer project:
I have a Custom action in JScript,
How should I pass [TARGETDIR] to it?
i need the following var to be inited with the
Path user installed to (i.e. [TARGETDIR]):
var Path = Session.Property([TARGETDIR]);
Debugging Jscript returns:
JScript runtime error : [TARGETDIR] is undefined.
MSDN says:
Session.TargetPath(folder)
folder:
Required case-sensitive name of a folder property as specified by a primary key of the Directory table. An error is generated if the folder does not exist.
First row in Directory table in generated .msi (according to ORCA) is [TARGETDIR].
So i assume it is defined up to the moment the script starts.
WHY the script is not receiving it?
Thanks,
This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.
Passing data to CA in JScript
Started by
AndyCar
, Sep 25 2002 22:53
2 replies to this topic
Posted 26 September 2002 - 17:25
Hi,
If your custom action is DEFFERED type, you can't retrieve any property except "CustomActionData" property. Because this CA will run later in installation process when prepared Installation script is getting executed and that time Installer Session will be expired. You can only retrive property from Installer Session object if CA is immediate Execution type.
Otherwise you have to store required information in "CustomActionData" property so later you can retrive it.
I hope it will help you.
-Vipul
If your custom action is DEFFERED type, you can't retrieve any property except "CustomActionData" property. Because this CA will run later in installation process when prepared Installation script is getting executed and that time Installer Session will be expired. You can only retrive property from Installer Session object if CA is immediate Execution type.
Otherwise you have to store required information in "CustomActionData" property so later you can retrive it.
I hope it will help you.
-Vipul
Posted 26 September 2002 - 22:47
Quote (vnadoda @ Sep. 26 2002,16:25) |
Otherwise you have to store required information in "CustomActionData" property so later you can retrive it. I hope it will help you. -Vipul |
Thanks Vipul, that worked! ;-)
(I didn't realized that I need to retreive that property)