MsiInstallProduct *DOESN'T* return 0x80004005 for a missing MSI file. It returns ERROR_FILE_NOT_FOUND (2) if the file isn't found and ERROR_PATH_NOT_FOUND (3) if the path does not exist. This goes back to Richard's question, which (paraphrased) is how the heck are you calling MsiInstallProduct?
If you have an Interop problem it's perhaps because you decided to import msi.dll and you're using COM interfaces that were really intended only for late-binding (like VBScript). Using P/Invoke with one of the many wrappers (like Richard's) is much more reliable. Phil Wilson -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Krause, Henning Sent: Thursday, January 24, 2008 2:30 AM To: Richard; WiX Users Subject: Re: [WiX-users] Bootstrapper and MsiInstallProduct [Solved] Hello, I've resolved the issue. The problem was that when I installed another executable I had an OpenFile common dialog from which I chose that executable. This file dialog caused the current directory to be changed. I then called MsiInstallProduct with a relative path which failed because the installation file could not be found. What I don't understand here is why MsiInstallProduct returns 0x80004005 here instead of a meaningful error message. If an error occurs later in the setup, the correct error code is returned so I'm ruling out some sort of interop problem here. Anyway, thanks for your help! Kind regards, Henning Krause > -----Original Message----- > From: [EMAIL PROTECTED] [mailto:wix-users- > [EMAIL PROTECTED] On Behalf Of Richard > Sent: Thursday, January 24, 2008 4:31 AM > To: WiX Users > Subject: Re: [WiX-users] Bootstrapper and MsiInstallProduct > > > In article > <[EMAIL PROTECTED]>, > "Krause, Henning" <[EMAIL PROTECTED]> writes: > > > the order is this: > > > > 1. Call calc.exe > > 2. Call MsiEnableLog > > 3. Call MsiInstallProduct. > > > > MsiInstallProduct then returns E_FAIL. > > MSI functions don't return HRESULTs, so it doesn't return E_FAIL. > > How are you calling MSI functions through interop? i.e. custom > p/invoke, some wrapper library, what? > -- > "The Direct3D Graphics Pipeline" -- DirectX 9 draft available for > download > <http://www.xmission.com/~legalize/book/download/index.html> > > Legalize Adulthood! <http://blogs.xmission.com/legalize/> > > ----------------------------------------------------------------------- > -- > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2008. > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > _______________________________________________ > WiX-users mailing list > WiX-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/wix-users ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users