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

Best way to check a feature's installed state ?


3 replies to this topic

TreviBoy

TreviBoy
  • Members
  • 16 posts

Posted 01 July 2002 - 21:43

hi,
I'm using a standard project.  I want to check to see if a feature is installed previously when I am re-installing..
What's the best way to do that ?

thanks

Leigh Ravenhall

Leigh Ravenhall
  • Members
  • 269 posts

Posted 03 July 2002 - 10:21

You could make a call to MsiGetFeature state.  It returns the current state and action state of a feature.
Leigh Ravenhall
Expert Information Services

Leigh Ravenhall

Leigh Ravenhall
  • Members
  • 269 posts

Posted 08 July 2002 - 02:13

In reply to your message, I think that in a standard project, there is an MSIHANDLE (MSI_HANDLE?), or something similar that can be passed as the first parameter of the function call.
Leigh Ravenhall
Expert Information Services

erniev

erniev
  • Members
  • 5 posts

Posted 07 August 2002 - 21:30

/* these are the enumerated install states returned by MsiGetFeatureState
-6 INSTALLSTATE_BADCONFIG //The configuration data is corrupt.
-5 INSTALLSTATE_INCOMPLETE //The installation is suspended or in progress.
-4 INSTALLSTATE_SOURCEABSENT //The feature must run from source, and the source is unavailable.
-3 INSTALLSTATE_MOREDATA //The return buffer is full.
-2 INSTALLSTATE_INVALIDARG //An invalid parameter was passed to the function.
-1 INSTALLSTATE_UNKNOWN //An unrecognized product or feature was specified.
0  INSTALLSTATE_BROKEN //The feature is broken.
1  INSTALLSTATE_ADVERTISED //advertised feature
2  INSTALLSTATE_ABSENT //The feature was uninstalled.
3  INSTALLSTATE_LOCAL //The feature was installed on the local drive.
4  INSTALLSTATE_SOURCE //The feature must run from source, CD-ROM, or network.
5  INSTALLSTATE_DEFAULT //The feature will be installed in the default location: local or source.
*/