rgr
Posts: 6
Joined: Wed Jan 30, 2013 1:28 pm

How to pass SOURCEDIR property to vbscript

I have a cutum action, "Launch Attached File", that excecutes an vbscript. In the script I need de resolved directory from the SOURCEDIR property which I made under the Install parameters. How do I do that :? Please, an example would be helpful. I am trying to accomplish this but I can't figure it out from the manual.
R.Mueller
Posts: 202
Joined: Thu Aug 02, 2012 3:31 pm

Re: How to pass SOURCEDIR property to vbscript

Hi rgr,

just use

Code: Select all

Session.Property("SOURCEDIR")
for that (inside of your VBScript).

Regards,

Roland
Daniel
Posts: 8276
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: How to pass SOURCEDIR property to vbscript

Hello,

As Roland mentioned, if you need to get or set a property value from a VB Script custom action, then you can use Session.Property property.

Please keep in mind that only immediate custom actions have direct access to public properties. The "Deferred", "Rollback" or "Commit" custom actions will not have access to installer properties (the properties will be empty when the custom action runs). If you want to use properties in a "Deferred" custom action you need to use the Action Data field.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Building Installers”