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!

srini
Posts: 81
Joined: Mon Sep 14, 2009 4:22 pm

Changing label text from VBScript

Hello,

I am trying to change the text of a label from the VBScript using the Session.Property method. But this does not seem to be working. I have associated the label to a property. Is there anything special should I do to change the label text?

Thanks
GabrielBarbu
Posts: 2146
Joined: Thu Jul 09, 2009 11:24 am
Contact: Website

Re: Changing label text from VBScript

Hello,

You may want to update your label text either with or without Enhanced UI.

With Enhanced UI
In order to initiate a refresh on an Enhanced UI Dialog, you only need to set the AiRefreshDlg property. Each time AiRefreshDlg is being set, the user interface refreshes.

Below is a sample script that increments a property, then refreshes the dialog to display the updated property

Code: Select all

Dim x
x = Session.Property("MYPROP") 
x = x+1
Session.Property("MYPROP") = cstr(x)

'setting AiRefreshDlg refreshes the controls on a dialog when Enhanced UI is enabled.
Session.Property("AiRefreshDlg") = cstr(1)
Without Enhanced UI
The UpdateMsiEditControls Custom Action is responsible for refreshing an MSI dialog. Described below is the proper usage of this custom action.
- on the Custom Actions page, right click "UI Custom Actions" and select "Add Predefined UI Custom Action"->"Update MSI Edit Controls"
- this custom action needs to be called after the published event that changes the property, as seen in the screenshot below.
published.events.image.screenshot.JPG
published.events.image.screenshot.JPG (27.48 KiB) Viewed 4699 times
Also, below is a sample project that implements this for both cases.
Sample.zip
(3.35 KiB) Downloaded 443 times


Regards,
Gabriel
Gabriel Barbu
Advanced Installer Team
http://www.advancedinstaller.com/
srini
Posts: 81
Joined: Mon Sep 14, 2009 4:22 pm

Re: Changing label text from VBScript

That is sorted. Thanks Gabriel.

Return to “Common Problems”