How to build multi-lingual _un_installs?

Got a problem you cannot solve? Try here.
Christoph Schneegans
Posts: 55
Joined: Tue Jan 09, 2007 12:20 pm

How to build multi-lingual _un_installs?

Postby Christoph Schneegans » Wed Jan 24, 2007 12:19 pm

Hello!

I've created a multi-lingual setup, which works very well. However, when I remove the program via the control panel, no language selection dialog is displayed. In fact, the LANGUAGE variable is empty. According to the help file, this means that I'm running a non multi-lingual uninstall. That's a pity. How do I make uninstalls multi-lingual?

MichaelNesmith
Posts: 3452
Joined: Thu Dec 22, 2005 7:17 pm
Contact:

Postby MichaelNesmith » Wed Jan 24, 2007 1:54 pm

Are you sure LANGUAGE is empty? The language selection dialog box will not be shown during maintenance, this behavior is as-designed - since the product has already been installed in the language chosen by the user.
Michael Nesmith
InstallAware
Home of The Next Generation MSI Installer
Get your free copy today - http://www.installaware.com/

Christoph Schneegans
Posts: 55
Joined: Tue Jan 09, 2007 12:20 pm

Postby Christoph Schneegans » Thu Jan 25, 2007 4:45 am

I'm sure. In the first lines of my script, I log some of the relevant variables. This is the logfile for a first-time install:

Code: Select all

2007-01-25 09:51:53 - Setup started.
2007-01-25 09:51:53 - MAINTENANCE: FALSE
2007-01-25 09:51:53 - NEEDSUPGRADE: FALSE
2007-01-25 09:51:53 - LANGUAGE: German

This is the logfile for an uninstall:

Code: Select all

2007-01-25 10:29:35 - Setup started.
2007-01-25 10:29:35 - MAINTENANCE: TRUE
2007-01-25 10:29:35 - NEEDSUPGRADE: FALSE
2007-01-25 10:29:35 - LANGUAGE:

When my program has been installed, %ALLUSERSPROFILE%\\Application Data\\<GUID>\\my-project.lan contains a single line that identifies the languages selected, e.g.:

German

However, the maintenance dialog does _not_ display the localized strings from my translations.German. During first-time installs, the localized strings are used as expected. I then tried to set a fallback language:

Code: Select all

if Variable LANGUAGE Equals
  Set Variable LANGUAGE to English
end

This doesn't work either, LANGUAGE remains empty, and the strings from my translations.English are not used for uninstalls. It really seems that for some reason, my uninstall is not multi-lingual.

Christoph Schneegans
Posts: 55
Joined: Tue Jan 09, 2007 12:20 pm

Postby Christoph Schneegans » Thu Jan 25, 2007 7:22 am

This is what I've found in the meantime:

LANGUAGE is empty when
    · I use "Add or Remove programs" in the control panel and click "Change" or "Remove".
    · I run %ALLUSERSPROFILE%\\Application Data\\<GUID>\\my-project.exe or my-project.msi.
In this case, my logfile looks as follows:

Code: Select all

2007-01-25 13:15:33 - Setup started.
2007-01-25 13:15:33 - MAINTENANCE: TRUE
2007-01-25 13:15:33 - NEEDSUPGRADE: FALSE
2007-01-25 13:15:33 - LANGUAGE:

LANGUAGE equals "German" (remember that this is the value in the my-project.lan file) when
    · I run the same version of Release\\Web\\my-project.exe (Web-based EXE build) again which installed the program in the first place. Please note that no language selection dialog is displayed in this case, yet the proper translations.German is used.
In this case, my logfile looks as follows:

Code: Select all

2007-01-25 13:15:53 - Setup started.
2007-01-25 13:15:53 - MAINTENANCE: TRUE
2007-01-25 13:15:53 - NEEDSUPGRADE: FALSE
2007-01-25 13:15:53 - LANGUAGE: German

What seems curious to me is that my-project.exe does not honor the .lan file when it's in the same directory. One would expect exactly the opposite behavior.

I've run the "File Monitor" tool from Microsoft's Sysinternals Suite. When I run Release\\Web\\my-project.exe, the my-project.lan file is accessed a couple of times, as expected. When I use the control panel or %ALLUSERSPROFILE%\\Application Data\\<GUID>\\my-project.exe, however, this file is not accessed at all!

MichaelNesmith
Posts: 3452
Joined: Thu Dec 22, 2005 7:17 pm
Contact:

Postby MichaelNesmith » Thu Jan 25, 2007 2:11 pm

Strange one, I cannot reproduce this. Are you changing the product name or title in the installation script? You can see for yourself with an empty project that this works fine. The only case I can think of why it might fail for you is if you are changing the default product name ($TITLE$) or something similar.

Try to create an empty project, just "dummy" localize it (export and then re-import right away), and add a MessageBox to display the value of $LANGUAGE$ in the script. See what happens!

If you can nail the issue, I will be able to escalate and get a resolution faster.
Michael Nesmith

InstallAware

Home of The Next Generation MSI Installer

Get your free copy today - http://www.installaware.com/

Christoph Schneegans
Posts: 55
Joined: Tue Jan 09, 2007 12:20 pm

Postby Christoph Schneegans » Fri Jan 26, 2007 4:06 am

You are absolutely right. I created a new Default Project "my-project", and just added two lines of code,

Code: Select all

Set Variable TITLE to foobar
at the very beginning, and

Code: Select all

MessageBox: , LANGUAGE: $LANGUAGE$
in the "Perform Uninstallation" region, and the problems occured immediately.

I can workaround the problem when I copy "my-project.mtx" to "foobar.mtx", and make this copy a support file as well, so this seems very much connected to my previous post Compiler variable in title suppresses language selector.


Return to “Technical Support”

Who is online

Users browsing this forum: No registered users and 136 guests