Merge Module questions
Hi,
I have 2 different questions related to merge modules.
1. I am creating a setup which includes 2 merge modules.Both the merge modules install files to the "C:\Program Files\Common Files\ProductNameA" and "C:\Program Files\Common Files\ProductNameB" location. But there are a few files that need to go to these locations:
AllUsers\ApplicationData\X\ProductNameA
AllUsers\ApplicationData\X\ProductNameB
So, for that I craeted a property in the merge module, and intialized it as NULL. Then did a system search in the merge module itself and got the location AllUsers\ApplicationData from the registry. I created a folder in the "Destination Files" and then looked up the name of the folder that got created. In this case it got created as "INSTALLDIR1.MergeModuleGUID". Then with the SetDirectory Custom action I set this directory to the system search property with my path appended. But for some reason after installation this directory does not get created. I have done this sort of a thing - installing to location other than install dir a number of times through the WSI, and it works perfectly, but have never done this in the merge module. Am I missing something here?
2. Second question is - Is it possible to have a custom action in the wsi - "Run WiseScript From Installed File" in the wsi that is schedule to run after InstallFinalize in Execute Immediate, and the exe is installed with the merge module. I tried that but the custom action never browses to the files included in the merge module.
Thanks!
I took a look at the log file
I took a look at the log file and looks liek the properties in the merge modules are getting set correctly but the directories are not.
COMMDOCLOC.48E70956_D414_43F5_B74F_4A12A87A9696 does get set but
INSTALLDIR1.48E70956_D414_43F5_B74F_4A12A87A9696 does not.
COMMDOCLOC.AFA50AB8_2E29_4513_BD70_6E495C50DB64 does get set but
INSTALLDIR6.AFA50AB8_2E29_4513_BD70_6E495C50DB64 does not.
Also, I thought I could use a property thats in the msi to set a directory in Merge module, but thats not working for me. Am I missing something?
I have attached the log file
I have attached the log file with my original post.
Confused
There is quite a bit of information in your posting, but for the custom actions, you have not specified where they are sequenced.
Are you relying on property values set in the UI sequence ? If so, you must make sure that they are all PUBLIC properties otherwise they will not survive when the UI sequence terminates. Only public properties maintain their values from the UI to the Execute sequence.
Also, why are you bothering with system search to find the location of the ALLUSERS profile.
The environment variable ALLUSERSPROFILE is already set to the location, and can be referenced directly using the syntax:
[!ALLUSERSPROFILE]
If your issue has been solved, please use the "Mark as Solution" link on the most relevant thread.
Sequencing solved it
Thanks for the reply. Sequencing the custom action was the issue. It was set to "No Sequence". I corrected it to be scheduled in Normal Execute Immediate/Deferred after CostFinalize and it works fine now.
My second question: Is it possible to have a custom action in the wsi - "Run WiseScript From Installed File" in the wsi that is scheduled to run after InstallFinalize in Execute Immediate, and the exe is installed with the merge module. I tried that but the custom action never browses to the files included in the merge module.
Thanks!
Merge Module
I don't quite see why you are having a problem with this.
Are you selecting the right view in Installation Expert? Please ensure that the "Current Feature" drop down is set to "All Features" so that the entire project is viewable and check that you can see the EXE from there before you switch to MSI script mode.
If your issue has been solved, please use the "Mark as Solution" link on the most relevant thread.
Yes, I am selecting the right
Yes, I am selecting the right view. The File I am looking to point to is a part of merge module files, and I want the custom action in the wsi.
Open 2 copies of the editor and Copy-and-Paste
When viewing a .wsi, Wise doesn't show stuff from merge modules. You can go into the options and have the Installation Expert "Show merge module components", but this only works when viewing the compiled .msi. The problem is that the merge modules are never really part of the .wsi project file and Wise doesn't grab that info from the .msm files to show it.
But what you could do is have two copies of the Windows Installer Editor open, one viewing the .wsi project file, and the other viewing the compiled .msi package. You could then go into the MSI Script tab (viewing the .msi) and create your custom action. After that, you could copy-and-paste into the .wsi. This would help you avoid type-o's, etc. and should be a lot easier than diving directly into the tables.
Just remember to close out of the .msi before compiling the .wsi or you'll get the error about the file being read-only or in-use. (If only I had a nickel for every time I've seen that message)
Would you like to reply?
Login or Register to post your comment.