Try out the "Feature and Component State Values" section at the bottom of
this page: http://msdn.microsoft.com/library/aa368012.aspx

 

You will probably use the $ComponentId=3 for installation, and
$ComponentId=2 for removal. Note that you may get true for $ComponentId=3
during repairs if some keypath in your feature is incorrect, so think about
repair behaviors.

 

This syntax can be used in conditionals (such as the condition for a custom
action to consume the file(s) in that component).

 

From: Mike Rerick [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, May 06, 2008 7:57 AM
To: Blair Murri
Subject: RE: [WiX-users] See if a file is going to be installed

 

Blair, thanks for the info. 

Unfortunately, writing my own DLL isn't an option at this time. I need to be
able to determine the component's state from within Wix, using the available
elements, variables, and standard/custom actions or extensions. 

Is there a way to look in the directory where it would be installed to see
if it was installed and set a property? 

Mike 

-----Original Message----- 
From: Blair Murri [mailto:[EMAIL PROTECTED] 
Sent: Monday, May 05, 2008 6:45 PM 
To: 'Mike Rerick' 
Cc: wix-users@lists.sourceforge.net 
Subject: RE: [WiX-users] See if a file is going to be installed 

You can query what the component that contains that file will do. 

  

http://msdn.microsoft.com/library/aa367858(vs.85).aspx describes the concept
(from the point of view of the log) and the API to use in your custom action
would likely be MsiGetComponentState (look primarily at the piAction
parameter). See the code in the WiX custom action library around that API to
better understand its usage and the relationship between the piInstalled and
piAction parameters, and what that  relationship means during install,
repair, upgrade, and removal.

  

From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Mike Rerick 
Sent: Monday, May 05, 2008 4:30 PM 
To: wix-users@lists.sourceforge.net 
Subject: [WiX-users] See if a file is going to be installed 

  

Hi all. 

  

I have looked all over and can't seem to find an answer to my question. 

  

I need to be able to determine if a file is going to be installed on a
user's computer. The file may or may not exist in the set of install files.
If the file exists, then I need to make sure that it gets executed (it is an
SQL script file).

  

How do I determine if the file exists in the set of files that will be
installed? 

  

Thanks in advance. 

  

Mike Rerick 

Sr. Software Engineer - Professional Services 

  <blocked::http://www.iwsinc.com/> 

  

9200 S.E. Sunnybrook Blvd., Suite 170 

Clackamas, OR   97015 

Phone: (503) 353-8068    Fax: (503) 353-8065 

  

  

The information contained in this transmission contains potentially
privileged, export controlled and/or confidential information of Imageware
Systems, Inc. or its customers or partners. It is intended only to be read
by the person(s) named above and for no other purpose. You are hereby
notified that any dissemination, distribution, duplication of this
communication or use of its contents for any purpose not authorized
expressly by Imageware Systems, Inc. is strictly prohibited and could lead
to both civil and/or criminal penalties. If you are not the intended
recipient, you are prohibited to review the contents herein and please
contact the sender by reply e-mail and destroy all copies of the original
message. To reply to our e-mail administrator directly, please send an
e-mail to [EMAIL PROTECTED]

 

The information contained in this transmission contains potentially
privileged, export controlled and/or confidential information of Imageware
Systems, Inc. or its customers or partners.  It is intended only to be read
by the person(s) named above and for no other purpose.  You are hereby
notified that any dissemination, distribution, duplication of this
communication or use of its contents for any purpose not authorized
expressly by Imageware Systems, Inc. is strictly prohibited and could lead
to both civil and/or criminal penalties.  If you are not the intended
recipient, you are prohibited to review the contents herein and please
contact the sender by reply e-mail and destroy all copies of the original
message.  To reply to our e-mail administrator directly, please send an
e-mail to [EMAIL PROTECTED]

-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to