Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

how to get installed component path from msi using VBS?

238 views
Skip to first unread message

marble

unread,
Oct 12, 2002, 9:27:02 PM10/12/02
to
Hi,
I know its possible; is there a minimal case example of how to query
an msi for the path of an installed dll or exe? Using vbs?

Thanks,
Hank


Carolyn Napier (MS)

unread,
Oct 15, 2002, 10:45:31 PM10/15/02
to
You can query for the component path using the Windows Installer Automation
Interface. In particular, you would need to create the Installer object and
then access the ComponentPath property of the Installer object. The
ComponentPath property requires that you provide it with the product code
and component Id.

The WiLstPrd.vbs sample script provided in the Windows Installer SDK
illustrates how to do this. For example:
"cscript wilstprd.vbs {E1EA0AF7-6522-459C-9C0F-A1362E1286F9} c" gave me the
list of installed components (and their paths) for MsiVal2 on my machine.

The short form would be something like below:
Dim installer
Set installer = Wscript.CreateObject("WindowsInstaller.Installer")
Wscript.Echo
installer.ComponentPath("{E1EA0AF7-6522-459C-9C0F-A1362E1286F9}",
"{60B9C714-90C8-11D2-88AC-00A0C981B015}")

The output is the installed location for the keypath of the evalcom
component in msival2.

Hope this helps,
- Carolyn Napier (MS)
Microsoft Windows Installer Team

Check out the Windows Installer FAQ at:
<http://www.microsoft.com/windows2000/community/centers/management/msi_faq.a
sp>

Please do not send email directly to the alias used to post to the
newsgroup. The alias is for newsgroup purposes only. This posting is
provided "AS IS" with no warranties, and confers no rights. Use of included
script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm

"marble" <mar...@drizzle.com> wrote in message
news:1034472422.917756@yasure...

Eugene Rusalsky

unread,
Oct 16, 2002, 9:27:45 AM10/16/02
to
Remark:
If Component installed, but key file was deleted, ComponentPath doesn't
return path to this component

"Carolyn Napier (MS)" <cna...@online.microsoft.com> wrote in message
news:ew$Ep3LdCHA.1376@tkmsftngp12...

0 new messages