MessageBox after uninstall with Parameter - 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!

sjan
Posts: 3
Joined: Wed Apr 23, 2008 3:27 pm

MessageBox after uninstall with Parameter

Hello,

I created a custom ScriptInline action under the "InstallFinalize" standard action.
The script is like in other Threads recommended :

Script Text: MsgBox "Message text"

My Installation has several languages, so I would like to have the "Message text" translated. So I tried a property , which i put into the script text like

Script Text: MsgBox myPropertyMessageText

I translated this property with the external dictionary function. But this doesn't work - no text ist displayed in the messagebox. How can I solve my problem with the different languages? I use a multilingual package for installation.

Thank you
Jan
Ionut
Posts: 605
Joined: Tue Nov 22, 2005 11:29 am
Contact: Website

Re: MessageBox after uninstall with Parameter

Hi Jan,

Follow these steps:

1. In the Translations page select the additional languages of your project.

2. In the Install Parameters page create the Property that will hold the message text, for instance "Prop".

3. In the "Edit Property" dialog, select "Localization" in the context-menu of the "Value" field in order to open the "Localization" dialog. Select the option "Always translate this string" in this dialog. You also have the possibility to specify a new localization identifier or use the default one ("Property.Prop").

4. In the Translations page click the "Create" button in order to generate a custom dictionary, which will be automatically added to your project (in the "Dictionaries" tab).

5. Open the generated AIL file in a text editor and you should see an element such as the following (if not, add it yourself):

Code: Select all

<ENTRY id="Property.Prop">
    <STRING lang="en" value="Your value"/>
    <STRING lang="hu" value=""/>
    <STRING lang="de" value=""/>
    <STRING lang="el" value=""/>
</ENTRY>
6. Complete the translation for the additional project languages, save the AIL file and then reopen the project.

7. The "Script Text" should be:

Code: Select all

MsgBox Session.Property("Prop")
You will find attached a sample project, together with the custom dictionary.

Regards,
Ionut
Attachments
LocalizedMessageExample.zip
Example project
(2.92 KiB) Downloaded 427 times
Denis Toma
Advanced Installer Team
http://www.advancedinstaller.com/
sjan
Posts: 3
Joined: Wed Apr 23, 2008 3:27 pm

Re: MessageBox after uninstall with Parameter

Thanks for your fast answer,

I see, I did almost everything right, except step 3 and 7. With the new Script text the message is displayed but the problem is, it's not translated. I forgot to mention that I use the professional version - so I can't build your sample project.

In my "edit property" dialog is no context-menu for the value field, so i can't select Localization. Where do I find this option?
The property is shown in the AIL-file and I translated the strings. But the appearing message text is not translated.

And there is another problem with the message dialog: After the successful uninstall the Message box is displyed, but it lies sometimes behind the installer window. So its not seen. You can bring it to front with a click on the taskbar symbol but it should appear direktly as the top window. How can I force that?

Thank you

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

Re: MessageBox after uninstall with Parameter

Hi,
In my "edit property" dialog is no context-menu for the value field, so i can't select Localization.
The context menu for the "Value" field in the "Edit Property" dialog can be shown by right-clicking inside the "Value" field. Also, the "Localization" option will be shown in this menu only if you have multiple languages selected in the Translations page. Note that this menu was included in Advanced Installer beginning with the 6.2 version. If you have an older version then the "Value" field can be localized by using the button with the flags.
After the successful uninstall the Message box is displyed, but it lies sometimes behind the installer window.
There is a similar discussion on the forum, please take a look:
http://www.advancedinstaller.com/forums ... f=2&t=4675

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
sjan
Posts: 3
Joined: Wed Apr 23, 2008 3:27 pm

Re: MessageBox after uninstall with Parameter

Hello,

omg - I never tried to right-click into the value field - how embarrassing - of couse it works now.

The other topic helped also. It is not the best solution, but it works.

Thanks for the fast help.

Regards
Jan

Return to “Common Problems”