xnejx
Posts: 18
Joined: Sun Sep 19, 2010 6:10 pm

Custom Actions Function Name parameters?

Hi,

I'm trying to pass the [APPDIR] parameter to my .vbs script but i can't pass the parameter to it.

I've tried to call it YourFunction("test") and YourFunction "test" from the function name field in custom actions, but it fails and gives an error in both cases. If i call the function without a parameter - it works.

Here is the VBS code:

Code: Select all

Public Sub YourFunction (parameter)
MsgBox "Passed: "&parameter
End Sub
How can I pass the parameter from the function name field to my VBS?
GabrielBarbu
Posts: 2146
Joined: Thu Jul 09, 2009 11:24 am
Contact: Website

Re: Custom Actions Function Name parameters?

Hello,

VBScript custom actions do not support parameters. Data is passed to them through Windows Installer properties, which ca be accessed from the VBScript using Session.Property("PROPERTY_NAME").

Best regards,
Gabriel
Gabriel Barbu
Advanced Installer Team
http://www.advancedinstaller.com/

Return to “Common Problems”