There's always a way to find the component guid. If it's installed, run this as
a .vbs VBScript. It will tell you every component guid and file name on the
system, what products are using it, and where it's installed.
=======================
Option Explicit
Public installer, fullmsg, comp, a, prod, fso, pname, ploc, pid, psorce
Set fso = CreateObject("Scripting.FileSystemObject")
Set a = fso.CreateTextFile("comps.txt", True)
' Connect to Windows Installer object
Set installer = CreateObject("WindowsInstaller.Installer")
a.writeline ("MSI Components")
on error resume next
For Each comp In installer.components
a.writeline (comp & " is used by the product:")
for each prod in Installer.ComponentClients (comp)
pid = installer.componentpath (prod, comp)
pname = installer.productinfo (prod, "InstalledProductName")
a.Writeline (" " & pname & " " & prod & "and is installed at " & pid)
Next
Next
Phil Wilson
-----Original Message-----
From: Eric Napier [mailto:[email protected]]
Sent: Wednesday, July 22, 2009 1:45 PM
To: [email protected]
Subject: Re: [WiX-users] filesearch not finding file
Component search is a better choice except that I won't know the old
component guid.
So instead I'm checking for the presence of this file. If it's there, I want
to fail the install.
---------- Forwarded message ----------
From: "Wilson, Phil" <[email protected]>
To: General discussion for Windows Installer XML toolset. <
[email protected]>
Date: Wed, 22 Jul 2009 11:09:47 -0700
Subject: Re: [WiX-users] filesearch not finding file
What's the goal here? Are you looking for that file, or is it just a marker
for a previous version of the product? If it was previously installed with
an MSI package a component search would be more reliable - it doesn't depend
on directory locations, and it works if the user changes the install folder
from the default Program Files location.
Phil Wilson
-----Original Message-----
From: Eric Napier [mailto:[email protected]]
Sent: Wednesday, July 22, 2009 8:29 AM
To: [email protected]
Subject: [WiX-users] filesearch not finding file
I want to fail an installation if a file (msi.ini) is present. My filesearch
element doesn't seem to be finding my file. I've confirmed the file is
there.
If I remove the filesearch element, the directory search finds the directory
and fails the install. However, when I include the filesearch element it
never finds my file.
Can you see my mistake?
My code below.Thanks.
<Property Id="PREVIOUSMSIINSTALLED">
<DirectorySearch Id="MsiIniSearchDir" Path="[HostDir]">
<FileSearch Id ="MsiIniSearch" Name="msi.ini"/>
</DirectorySearch>
</Property>
<!-- Do not proceed if an MSI ini was found, unless this is an
uninstallation.-->
<Condition Message="Please remove the previous rep console MSI before
installing.">(REMOVE ~= "ALL") OR (NOT PREVIOUSMSIINSTALLED)</Condition>
------------------------------------------------------------------------------
_______________________________________________
WiX-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wix-users
------------------------------------------------------------------------------
_______________________________________________
WiX-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wix-users