tlentine
Posts: 10
Joined: Mon Apr 27, 2009 10:14 pm

Unable to Retrieve AppDir property using VB Script

I am trying to port one of our installers from an InstallShield project to a new Advanced Installer project. The project in question uses a number of VB Script files to perform custom actions. Most of these rely upon knowing the AppDir (InstallDir in the original InstallShield project).

For some reason, my scripts are unable to retrieve the AppDir property when the MSI is created from Advanced Installer.

Is there a trick I am missing for this?

The code I am using is similar to the following:

VariableName = Session.Property("AppDir")

Any pointers would be greatly appreciated.
cyb
Posts: 43
Joined: Wed Apr 15, 2009 1:06 pm

Re: Unable to Retrieve AppDir property using VB Script

Hi,

A reason could be that you don't use only capital letters to define the installation directory. Instead of "AppDir" it should be "APPDIR".
Or, it might be because the custom actions containing the VBScripts are not set as "Immediate" . That option can be set in the Custom Action Properties page -> Execution Options. You can find more help in this Custom action article.
Try these approaches and let us know if the problem persists.

Best regards,
cyb
Cosmin Budrica
Advanced Installer Team
http://www.advancedinstaller.com/
tlentine
Posts: 10
Joined: Mon Apr 27, 2009 10:14 pm

Re: Unable to Retrieve AppDir property using VB Script

Thanks, capitalizing APPDIR did the trick.

Return to “Common Problems”