We’re moving our forums to a new platform.

You can still browse and search existing topics, but you can no longer create new topics or post replies.

For questions, technical issues, or feature requests, please don’t hesitate to contact our support team at support@advancedinstaller.com.

Thank you for your understanding!

rdevries
Posts: 5
Joined: Fri Nov 10, 2006 6:05 pm

Passing install parameters to custom action scripts

Hey Everyone,

This is my first shot at working with this software package and am currently still evaluating it, but so far I am pretty impressed.

At the moment I am trying to kick off a custom script to do some search-and-replaces on some of my application's configuration files. How do I pass some of the install parameters, such as for instance the Installation Directory, to my custom action script?

Richard
gigi
Posts: 2103
Joined: Tue Apr 11, 2006 9:55 am
Contact: Website

Hi,
How do I pass some of the install parameters, such as for instance the Installation Directory, to my custom action script?
To access the value of a property in a custom action VBS script use this code:

Code: Select all

var = Session.Property("APPDIR")

where APPDIR is the property that contains the Installation Directory.

Or you can create a "New INI File" in the "Files and Folders" page and create new entries with the value of a property. For more details please see:
http://www.advancedinstaller.com/user-g ... files.html

Hope this helps.

Kind Regards,
Gigi
______________
Gheorghe Rada
Advanced Installer Team
http://www.advancedinstaller.com
rdevries
Posts: 5
Joined: Fri Nov 10, 2006 6:05 pm

Hi GiGi, thank you for your reply.

How would I get access to this property from within C++ or Perl? Is this an Environment Variable that is temporarily being set?
gigi
Posts: 2103
Joined: Tue Apr 11, 2006 9:55 am
Contact: Website

Hi,
Is this an Environment Variable that is temporarily being set?
No, APPDIR is a windows installer property introduced by Advanced Installer. To read more about windows installer properties please see:
http://msdn.microsoft.com/library/defau ... erties.asp
How would I get access to this property from within C++ or Perl?
Also on how to use windows installer properties in a C++ custom action DLL please see:
http://www.advancedinstaller.com/user-g ... n-dll.html

Hope this helps.

Best Regards,
Gigi
______________
Gheorghe Rada
Advanced Installer Team
http://www.advancedinstaller.com
peddro
Posts: 10
Joined: Tue Jan 09, 2007 9:22 am

how can i access [APPDIR] in a batch file on install ?



i used %CD% to expand the path - however i don't think this works on all windows versions

Return to “Common Problems”