Hi,
Function Name: doesn't seem to work. I always get an error. I found if i didn't use a function name at all the script would run. Documentation isn't very clear on this.
A function name needs to be specified when using a C++ DLL custom action (the field becomes a combo which contains the available functions). However, this is optional when using a VBS file. For example if the code looks like this:
Code: Select all
Function MyFunction()
'code
End Function
the "Function Name" field should be set to:
If the VBScript doesn't use a function, the "Function Name" field should be empty.
From the little documentation I could find. I got the impression that you could only pass "Formatted Type" arguments to an exe or dll. Is this true?
An EXE custom action can receive arguments only through its command line, which can use hard-coded values or
formatted elements. A C++ DLL custom action can access only installer properties through the
MsiGetProperty and
MsiSetProperty functions.
Going under the assumption that I wasn't going to be able to pass in arguments I looked at the Session object. The following script fails on line 2.
MsgBox "I'm in the script"
MsgBox Session.Property("APPDIR") <--- fails on this line.
I'm not sure why you are encountering this behavior. Can you please send us the .AIP (project) file, the VBScript file and a
verbose log of the install process to
support at advancedinstaller dot com so we can investigate them?
Note that the path of the folder which contains the MSI is stored in the SOURCEDIR property.
Regards,
Cosmin