Session.Property("APPDIR") returns NULL in vbscripts - 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!

kambizt
Posts: 25
Joined: Thu Mar 30, 2006 11:25 pm

Session.Property("APPDIR") returns NULL in vbscripts

Hi,
I'm trying to use the [APPDIR] in my vbscript as part of a a Custom Action. Every time I use the following statement, it comes back with a NULL (why?).

Session.Property("APPDIR")

Here is a snippet of my vbscript:

Dim p : p = Session.Property("APPDIR") : Set s = CreateObject("wscript.shell") : If MsgBox ("Would you like to download the latest Updates? ", 4132) = vbYes Then : s.run "cmd /K " & p & "FTP.bat", 1, true : End If


Can you please help?

Thanks.
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: Session.Property("APPDIR") returns NULL in vbscripts

Hi,

Is the custom action set as "Immediate" in the Custom Action Properties pane? Please note that only immediate custom actions can access installer properties.

If the custom action is immediate and the problem persists, please send us the .AIP (project) file you are using to support at advancedinstaller dot com so we can investigate it.

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
kambizt
Posts: 25
Joined: Thu Mar 30, 2006 11:25 pm

Re: Session.Property("APPDIR") returns NULL in vbscripts

Hi cosmin,

Thanks for the note.
My Custom action was set to "Commit"; that is why I wasn't able to get the property value. I'll give it a try and let you know if I run into any other problem.

Regards,
kambizt

Return to “Common Problems”