the Session.property("APPDIR") is NULL - 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!

sailor-yt
Posts: 4
Joined: Thu Aug 21, 2008 7:38 am

the Session.property("APPDIR") is NULL

Hi, I need help.
When I add a .vbs file into "Custom Actions->InstallExecuteSequence->install", I found the the Session.Property("APPDIR") is NULL in the .vbs file.And I have use "Immediate execution" as "Execution Options" for this custom action.
Thanks!
Sailor
sailor-yt
Posts: 4
Joined: Thu Aug 21, 2008 7:38 am

Re: the Session.property("APPDIR") is NULL

How can i get the path of my installation at "Custom Actions->InstallExecuteSequence->install"?

thanks

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

Re: the Session.property("APPDIR") is NULL

Hi,
I found the the Session.Property("APPDIR") is NULL in the .vbs file.And I have use "Immediate execution" as "Execution Options" for this custom action.
I'm not sure why you are encountering this behavior. Can you please send us the code you are using and the .AIP file to support at advancedinstaller dot com so we can investigate them?
How can i get the path of my installation at "Custom Actions->InstallExecuteSequence->install"?
For this you can use the APPDIR property like you are doing now.

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
sailor-yt
Posts: 4
Joined: Thu Aug 21, 2008 7:38 am

Re: the Session.property("APPDIR") is NULL

Thanks for your quickly reply.

the .vbs scripts in "Custom Actions->InstallExecuteSequence->install" is :

path=Session.property("APPDIR") :file=path+"file.bat":cmd="Set PASHOME="+path:Set fso=CreateObject("Scripting.FileSystemObject"):Set ts=fso.CreateTextFile(file, true): ts.WriteLine(cmd):ts.Close

But the scripts has error when I run the installation.Then I found the path is NULL.
At the same time ,the Session.property("APPDIR") is not null in the .vbs script in "Custom Actions->InstallExecuteSequence->costfinalize",the code is :

tempappdir = Session.Property("APPDIR") : Session.Property("MY_APPDIR") = Left(tempappdir, Len(tempappdir) - 1)

May you give me some advice?
Thanks

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

Re: the Session.property("APPDIR") is NULL

Hi,

Please note that in VBScript the strings are concatenated with the "&" character, not with "+". If the problem persists after modifying the code, please send us the AIP you are using (if it doesn't contain confidential information) or a small test case which reproduces the problem so we can investigate it.

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
sailor-yt
Posts: 4
Joined: Thu Aug 21, 2008 7:38 am

Re: the Session.property("APPDIR") is NULL

Hi cosmin:

When i modify scripts from "+" to "&", the Session.Property("APPDIR") is no null. So thank u a lot.

By the way, I also can concatenate strings with "+", It's very strange.

Sailor

Return to “Common Problems”