Merge module localization
Updated: 26 Sep 2010 | 8 comments
Hello everybody.
I need a bit of help with Wise Installation Studio 7.3.
I am working on the creation of several installation packages for my applications. These applications are sharing some files (a licensing system) so I think using a merge module would be the best way to handle this.
The merge modul should contain a few binary files and documentation files. I need to create some shortcuts to these files but I cannot find a way to specify shortcuts in different languages. It looks like there is no Languages page for a merge module, so how can I do ?
Best regards
discussion Filed Under:
Comments
I have often 'cheated' and
I have often 'cheated' and made shortcuts in the main wsi script, e.g. make a regular shortcut first that points at any file in the installation. Then edit the Shortcut table and change the Target column to contain the Component name of the file in the Merge Module. This will show an error in the wsi, but once it is compiled into an MSI, it will validate OK. I am not sure if this can be applied to your situation.
The way this is often handled
The way this is often handled in vendor installs is to create a separate transform for each language - eg 1033.mst, and then compile to EXE using a wisescript wrapper that detects the language of the target and calls the appropriate transform.
Alternatively, you can create shortcuts using VBScript and therefore could create a language specific shortcut programmatically.
If your issue has been solved, please use the "Mark as Solution" link on the most relevant thread.
Thank you both for your answers
Thank you both for your answers. I will try your solutions asap.
If I understand well, I will need to create the shortcuts in the main package (I cannot see a way of creating a transform for a merge module for example) except for the VBScript technique.
Tank you again.
I made some tests in various
I made some tests in various directions and cannot manage to do what we need.
JohanN: I would not like to be forced to declare the shortcuts in all the packages using my merge module. This could lead to errors and does not manage correctly the uninstallation of the programs. If two packages using the same module are installed and only one is removed, I think (not tested) the shortcuts will be removed while the module files will stay installed.
EdT: I am pretty sur the tranform is the solution but I cannot manage to create a language tranform for a merge module in Wise Installation Studio. I think this is because Wise wants a msi as base file. I can select the .msm but saving the transform always fail with this error message: "Could not create Transform Summary Info for ...mst".
I also tryied to use some scripts to create/remove the shotcuts but I cannot find a way to detect the uninstallation mode. The REMOVE condition seems to be always empty (in the merge module).
Any clues?
You are correct that
You are correct that shortcuts will be removed. Shortcuts are not handled in a good way by Windows Installer. I have a workaround for it. When uninstalling a product, I check if the file still exists and then recreate the shortcut. This is done with vbscript as a CustomAction in the Merge Module.
For the condition, I use
Installed AND REMOVE~="ALL"
I don't exactly understand what you mean when you say that the REMOVE condition is empty in the Merge Module. The property is evaluated at runtime and then there are no Merge Modules, only Windows Installer and the MSI setup.
Updating the merge module
Yes, you cannot transform a merge module, as a merge module has no existence outside an MSI.
What you could try, is to open a new project and import your merge module, add the necessary changes to provide whatever shortcut support you require, etc, and then export this end result as a new merge module. So you could, for example, add scripts to generate shortcuts based on other cues that the merge module can pick up from the main project when it is imported.
However, do you really want to go down the merge module path? Merge module maintenance is just another overhead you have to factor into future releases, and even Microsoft appear to have moved away from the whole concept, as they are not maintaining their old libraries of merge modules and there are very few new ones being released, and those are all in Visual Studio as far as I am aware.
If your issue has been solved, please use the "Mark as Solution" link on the most relevant thread.
Thank you both again. JohanH:
Thank you both again.
JohanH: I added two custom actions in the merge module. One to create the shortcuts and the other one to remove them. The first one is triggered when the condition 'NOT Installed' is verified. The second is triggered when the condition 'REMOVE~="ALL"' is verified. This one is never executed. So I tryied to show the content of the condition using VBScript: MsgBox session.Property("REMOVE"). There is nothing in the property, even if I am uninstalling the package. The problem may have to do with my testing packages, I do not know.
EdT: I was trying merge modules because they look like to match our needs. I am new to msi packaging so this can be a bad option. The idea was to share the installation of a licensing system used in many of our products. The system should be installed by any product installed and stay there until the last application is removed. The merge modules looked perfect for that before I started to have those problems.
Thank you again for your help, I have a better understanding of the system now even if I still need to learn a lot.
Reference counting
If you ensure that the component GUID(s) of the components which hold your licensing system are kept consistent across all your packages then you achieve the same result as a merge module, as reference counting in the MSI world is based on tracking component GUIDs.
Regarding your vbscript to show the value of the REMOVE property - where are you sequencing it?
If you are putting any scripts into the UISequence, they will not run on an uninstall, as the uninstall does not run the UISequence.
Enabling verbose logging using the /L*v switch with Msiexec.exe will show you the progress of any installs or uninstalls, in great detail, so you can see whether your custom actions are called.
If your issue has been solved, please use the "Mark as Solution" link on the most relevant thread.
Would you like to reply?
Login or Register to post your comment.