Session property not available in UI - 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!

lars briem
Posts: 3
Joined: Tue Jun 26, 2012 9:12 am

Session property not available in UI

Hello,

On the ExitDialog of my installer I want to show a text depending on a property. To do this, I used the tipps in http://www.advancedinstaller.com/user-g ... itdlg.html
Instead of the InstallMode property I use my own property called "DEVICE_COUNT". To set this property I use a vbscript in a custom action. This will work if the custom action was triggered from the UI. But if the action is placed in the install sequence under: "InstallExecuteSequence --> Install" it will not work.

The vbscript is quite simple at the moment:
Session.Property("DEVICE_COUNT") = "0"

The control conditions look like this:
DEVICE_COUNT = "0" --> show
DEVICE_COUNT <> "0" --> hide

The vbscript execution options are:
Synchronouse execution, check return value
Immediate execution
Execute always

The installed AdvancedInstaller version is 7.7 build 28804

What I also tested was:
I added the property on the InstallParameters to the list of properties and set the value to 0. In this case it does not work, too. It looks like the property is not set when it is inserted on the InstallParameters page. And it is also not available when showing a message box with the property from within a custom UI action.

Could this be a bug?
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Session property not available in UI

Hello,

Please keep in mind that by design Windows Installer doesn't allow UI behavior to be set based on action scheduled from InstallExecuteSequence. Also, can you please tell us why do you need to do that?
What I also tested was:
I added the property on the InstallParameters to the list of properties and set the value to 0. In this case it does not work, too. It looks like the property is not set when it is inserted on the InstallParameters page. And it is also not available when showing a message box with the property from within a custom UI action.

Could this be a bug?

I'm afraid I cannot reproduce this behavior. Can you please create and attach a sample reproducing the behavior?

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
lars briem
Posts: 3
Joined: Tue Jun 26, 2012 9:12 am

Re: Session property not available in UI

Daniel.Radu wrote:Hello,
Please keep in mind that by design Windows Installer doesn't allow UI behavior to be set based on action scheduled from InstallExecuteSequence. Also, can you please tell us why do you need to do that?
In our software the user has the possibility to add funktionality in a dynamic way. This is done via additional jar files which can be installed from different devices or the internet.
In the old software we saved these jar files user dependent, but in the newer versions we want to store all these libraries user independent in one place. Because normally users who share their PC also use the same set of jar files and storing them in one place saves some memory on the harddisk and only needs updates for a jar once.

If the user now installs the new version of the software, there will be no jars loaded because our software will not search in the old place. To solve this problem I use a vbscript in the installer to move the jar files from the old place to the new one. After this task, I want to show a hint in the ExitDialog whether the installer has moved some jars or not. This hint is quite important because the jar files are used to communicate with devices and if there are no jars installed, the user is not able to communicate with devices and must install jars manually.
Daniel.Radu wrote:Hello,
I'm afraid I cannot reproduce this behavior. Can you please create and attach a sample reproducing the behavior?
I will try to reproduce this in an empty project tomorrow and will add a sample if I can reproduce it.
lars briem
Posts: 3
Joined: Tue Jun 26, 2012 9:12 am

Re: Session property not available in UI

lars briem wrote: I will try to reproduce this in an empty project tomorrow and will add a sample if I can reproduce it.
I was not able to reproduce this problem in an empty project. Maybe it was just a temporary error.

For the other problem I had an idea how it maybe can be solved. Is it possible to trigger custom UI actions when the ExitDialog is triggered?
Because then I can check the folder when the ExitDialog is loaded and are able to set the property
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Session property not available in UI

Hello,

In order to achieve your scenario you can run the related VB Script using a "Launch attached file" custom action with sequence scheduled after "Wizard Dialogs Stage -> User Selection -> ProgressDlg" standard action.

Let us know if this helped.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”