Why is APPDIR empty? - 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!

DJames
Posts: 8
Joined: Mon Dec 21, 2009 1:48 pm

Why is APPDIR empty?

I am using a VBScript Custom Action called from

InstallExecuteSequence > Install

Both of the following commands return an empty string

msgbox Session.Property("APPDIR")
msgbox Session.Property("TARGETDIR")

If I run them from
InstallExecuteSequence > InstallFinalize

Then they return the value that I expect...? I need this to be able to perform custom actions within the install location that the user selected during install

Thanks,


David
DJames
Posts: 8
Joined: Mon Dec 21, 2009 1:48 pm

Re: Why is APPDIR empty?

Ah sorry found the answer - execute options were set to deferred not immediate execution.
Not sure why, but that seems to have fixed it
DJames
Posts: 8
Joined: Mon Dec 21, 2009 1:48 pm

Re: Why is APPDIR empty?

I have this working for VBScript however I also have a .NET custom action

When I try and pass the deferred .NET action the APPDIR value it causes a Windows Installer Exception
"The error code is 2869"

I've copied this from "The .NET Installer Class Argument Dialog" page in the help trying to set a variable called AppFolder to [APPDIR] and it causes this error

Passing any properties other than [APPDIR] seem to work fine
GabrielBarbu
Posts: 2146
Joined: Thu Jul 09, 2009 11:24 am
Contact: Website

Re: Why is APPDIR empty?

Hello,

Please note that setting Windows Installer Properties from within .NET custom actions is not possible.
Other than that, I am not sure why you are encountering the error. Please send an install log and your .aip project file to support at advancedinstaller dot com so we can further investigate the issue.

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

Return to “Common Problems”