2

I have to create the language package for my customer released application, what is the best approach to create language package setup, so it will be installed on top customer release application.

I supposed to provide option to user to install and uninstall the language package as well.Suggest me the best way to do this through installshield 2011.

Yan Sklyarenko
  • 31,557
  • 24
  • 104
  • 139
Vinay MS
  • 550
  • 3
  • 6
  • 21

1 Answers1

0

I would do it this way.

Surely your application stores the installation folder in the registry when it's installed. Then your language pack searches for this registry entry.

  • If the install location is not stored in the registry, then your application is not installed: report an error and exit.
  • Otherwise you know where to copy the language files, so proceed to installing your language pack.

Your language pack will have its own entry in Add/Remove Programs.
If you don't want it, there are two other options:

  1. Register the language pack as an update to your application. Then it will displayed only when user chooses to see installed updates.
    How to do it is explained in Filtering the Add or Remove Programs List.
  2. Hide your package from Add/Remove Programs. In this case you have to provide another way to uninstall the package.

There's one other thing: The uninstaller for your main application should (could) provide options to uninstall all the installed language packs. You don't want to make users uninstall them manually, right?

It is tricky. The simplest approach that comes to my mind is your main uninstaller enumerates the installed languages packs and schedules its removal. Yet this may be not UAC-friendly.

Approaches to implementing removal of languages packs depend on how these packages are created. If your uninstaller has a bootstrapper, an .exe rather than bare .msi, then it could be quite easy. The bootstrapper initiates uninstall process for the main application. If it's successful, it proceeds to removing language packs. And it would be UAC-friendly: the bootstrapper asks for elevation when started, thus all the processes it starts will also be elevated.

Alexey Ivanov
  • 11,541
  • 4
  • 39
  • 68
  • Thanks Alexey.. Even I thought the same approach.Will you please elaborate how to register the language pack as an update to my application ? Even my main installer should uninstall all language pack which are installed.. that is one of the requirement as well.tell me how to do that – Vinay MS Mar 14 '12 at 13:08
  • Hi I need some more help, I created separate exe with only languages as component. I found install location from registry and set that through custom action. But I could not able register that as a update to my earlier installation.Will you help help me how I can set the parent key name for my separate exe – Vinay MS Mar 28 '12 at 10:32
  • @VinayMS Did you follow the instructions provided in the section [Filtering the Add or Remove Programs List](http://msdn.microsoft.com/en-us/library/aa969379.aspx#Filtering_Add_Remove_Programs)? – Alexey Ivanov Mar 29 '12 at 08:01
  • You can choose any key, the only thing to keep in mind is to not clash with other applications so make it specific enough. Use [`RegistryKey`](http://wix.sourceforge.net/manual-wix3/wix_xsd_registrykey.htm) element to add keys, [“How To: Write a Registry Entry During Installation”](http://wix.sourceforge.net/manual-wix3/write_a_registry_entry.htm) should help you. During uninstall of the language pack, you should not remove the key, only the values relevant to this pack; use [`RemoveRegistryValue`](http://wix.sourceforge.net/manual-wix3/wix_xsd_removeregistryvalue.htm). – Alexey Ivanov Mar 29 '12 at 16:17