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

Detecting Merge Modules on target system


1 reply to this topic

dkay

dkay
  • Members
  • 4 posts

Posted 15 June 2003 - 21:14

Hi

I was wondering if there's anyway to:

- check whether a target system has specific merge module already installed?
- if so, whether the installation state of the merge module is "healthy"?

eg. a merge module called X, has 5 DLL files and one EXE etc. One of these DLLs is replaced by a bad installation program, but nothing else.

Are there any API calls or Installation Automation calls to use in a small demo VB application (just to demonstrate this capability). My intention is to check whether the installation of merge module X is "healthy" or "not healthy" and take appropriate action.

BTW, I'm not writing an installation MSI; this is a demo **application** for my boss, to help with repackaging standards at work.

I am aware that some applications already do some feature checking through their own code (not the MSI install) and kick off WI repair if they find something they don't like (eg. Visio 2002). Just trying to do something similar.....

tia

DK

Zweitze

Zweitze
  • Full Members
  • 522 posts

Posted 16 June 2003 - 10:53

Well, after you merged a MSM into a MSI, you can't see the MSM anymore. So, after installation of the MSI you're basically out of luck.

But, most MSMs contain at least one component. You can check whether that component is installed on the system.

Your demo would be something like:
- Determine a component GUID from the MSM
- Check if this component is installed on the target system

Checking for its health is somewhat more complicated. You'll need to enumerate all packages that installed the component (multiple packages can contain the same MSM). For each package, check the state of the component.

Function MsiEnumClients enumerates all packages containing a certain component. Function MsiGetComponentState returns the state of the component.

Hope this helps