Pass parameters to JavaScript - Advanced Installer Community

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!

davega
Posts: 3
Joined: Mon Jul 02, 2007 8:27 am

Pass parameters to JavaScript

Hello!

I am using a JavaScript to make some modifications to an existing xml file. The modifications are specified in another installed xml-file.

I want to tell the script what xml-file that holds the new information. But because I can not use WScript.Arguments I wonder how I can let my function know what file to use.

Short code example:

function ResetXML(strFile) {

... reset functionality

}

Note!
I start the script as an installed custom action.


Best regards
/Stefan
gigi
Posts: 2103
Joined: Tue Apr 11, 2006 9:55 am
Contact: Website

Hi Stefan,

You cannot pass parameters to functions in dll's, VBScript, JavaScript etc. for use in custom actions. As an alternative you can create properties in AI which contain the parameters you need to send, and in your script you can use:

Code: Select all

value = Session.Property("PROPERTY_NAME")
Hope this helps,
Gigi
Gheorghe Rada
Advanced Installer Team
http://www.advancedinstaller.com/

Return to “Common Problems”