Thanks Phil,
I will try this tomorrow :)
Steve
From: Phill Hogland [via Windows Installer XML (WiX) toolset]
[mailto:ml-node+s687559n7594264...@n2.nabble.com]
Sent: April-22-14 7:11 PM
To: Steven Ogilvie
Subject: Re: Trying to use MsiLocatecomponent in Bootstrapper to check for a
Word PIA
When I change the code in question to be like the following, it gets the path.
(When I call the function as you did without and initial call with the sczPath
= NULL and cch = 0, then I never get the path, even if the buffer was larger
than needed. You second code post has other issues because pcchBuf is defined
as a DWORD array, etc.) But the following finds the path to Word on my system.
DWORD dwFileAttributes = 0;
BOOL fValidateComponentExists = FALSE;
INSTALLSTATE installState = INSTALLSTATE_BROKEN;
LPWSTR sczPath = NULL;
DWORD cch = 0;
LPWSTR sczComponentIdx86 =
L"{9FE736B7-B1EE-410C-8D07-082891C3DAC8}";
installState = MsiLocateComponentW(sczComponentIdx86, sczPath,
&cch);
cch++;
hr = StrAlloc(&sczPath, cch);
ExitOnFailure(hr, "Failed to allocate string for component
path.")
installState = MsiLocateComponentW(sczComponentIdx86, sczPath,
&cch);
if (INSTALLSTATE_LOCAL == installState) {
fValidateComponentExists = FileExistsEx(sczPath,
&dwFileAttributes);
}
________________________________
If you reply to this email, your message will be added to the discussion below:
http://windows-installer-xml-wix-toolset.687559.n2.nabble.com/Trying-to-use-MsiLocatecomponent-in-Bootstrapper-to-check-for-a-Word-PIA-tp7594186p7594264.html
To unsubscribe from Trying to use MsiLocatecomponent in Bootstrapper to check
for a Word PIA, click
here<http://windows-installer-xml-wix-toolset.687559.n2.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=7594186&code=U3RldmVuLk9naWx2aWVAdGl0dXMuY29tfDc1OTQxODZ8ODU3MjA0NTIw>.
NAML<http://windows-installer-xml-wix-toolset.687559.n2.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
--
View this message in context:
http://windows-installer-xml-wix-toolset.687559.n2.nabble.com/Trying-to-use-MsiLocatecomponent-in-Bootstrapper-to-check-for-a-Word-PIA-tp7594186p7594265.html
Sent from the wix-devs mailing list archive at Nabble.com.
------------------------------------------------------------------------------
Start Your Social Network Today - Download eXo Platform
Build your Enterprise Intranet with eXo Platform Software
Java Based Open Source Intranet - Social, Extensible, Cloud Ready
Get Started Now And Turn Your Intranet Into A Collaboration Platform
http://p.sf.net/sfu/ExoPlatform
_______________________________________________
WiX-devs mailing list
WiX-devs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-devs