Jump to content


This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.
Photo

MFC 7.1 merge modules


4 replies to this topic

Urban Olars

Urban Olars
  • Members
  • 2 posts

Posted 27 March 2005 - 18:42

I'm using the Windows Installer included in VC++ .NET 2003 to create an
installation for my MFC project. I have added Microsoft's merge modules for MFC7.1, which means that the MFC Dll's are installed in my applications folder. It's
just that I have a sub-folder called bin where I want to put all my
executables and dll's.
How can I change the destination for the files in the merge modules so they
are put in my \bin sub-folder instead of directly under my applications
folder?


Urban Olars

Urban Olars
  • Members
  • 2 posts

Posted 31 March 2005 - 21:45

I would appreciate if someone could take the time to help me with this. I'm a newbie which you may have realized already :-)

KathyMorey

KathyMorey
  • Full Members
  • 111 posts

Posted 01 April 2005 - 15:27

If I remember correctly from previous discussions about those merge modules, you can't change them. What you might look into instead is using the DuplicateFile or MoveFile table to make a copy of them in your bin directory.

HTH

Kathy Morey
Synergy Software Engineer
ProfitStars, a Jack Henry Company
kmorey@profitstars.com

Zweitze

Zweitze
  • Full Members
  • 522 posts

Posted 01 April 2005 - 22:37

Files from a merge module do get installed in a special directory, after merging the MSM a new entry in the directory table is created (something like INSTALLDIR.<GUID>).
This entry has a parent directory INSTALLDIR, and a DefaultDir value of ".:<GUID>", meaning that everything installed in this directory will be installed in the same folder that INSTALLDIR points to. In case of an admin install, the files will appear in a subfolder <GUID>.

If you change the DefaultDir value to "Bin:<GUID>", you should be OK. I don't think you can tell Visual Studio to do this, so you're stuck to do so with Orca after each build - although it's possible to create a script to do that for you.

The magic <GUID> value is derived from the MSM module ID, where all dots are replaced by underscores.

A different approach is creating a new subfeature, with a suitable directory assigned to it. Assign the MSM to this subfeature, give the subfeature the attribute msidbFeatureAttributesFollowParent, and set Display to 0 (meaning that it won't be visible in the UI). Disclaimer: I don't have experience on this.

Note: either approach do not apply to files that install to WinDir, WinSysDir etc.

cooki

cooki
  • Full Members
  • 35 posts

Posted 14 April 2005 - 18:20

I don't know which tool you use to design your setup, but in InstallShield X, go to the "merge modules" view, right click on the MFC 7.1 merge module, select "Properties", and in the middle of the appearing window, you have a combobox that allows you to specify the path where you want the files installed.

At least that's what i did when i installed the MFC 7.1. It has to work since this merge module is retargetable!

I hope it's helpful