Hi again.

My requirements have changed a little since the previous post, but the problem 
I am experiencing is very similar.  I need to be able to check for the 
existence of an IIS7 website based on the website's description.  If the 
website does not exist I need to cancel the installation.  If they website 
exists I want to continue the installation.  The new requirement is that I need 
to be able to save the site id of the website so that I may use it during an 
uninstall.

For debugging purposes I have hard coded the website's description.  I do not 
see any indication that a check for the website is being made within the MSI 
log file.  This is the code I am using:

     <iis:WebSite Id="IISWEBSITE" Description="Default Web Site" SiteId="*">
          <iis:WebAddress Id="IisWebAddress" Port="1"/>
     </iis:WebSite>

     <Condition Message="Website [WEBSITE] not found.">
          <![CDATA[IISWEBSITE]]>
     </Condition>

How can I perform a simple check for the existence of a website in IIS 7?

Note: I am using WiX 3.5 RC1.

Ryan Taylor
Office (207)-504-5294
rtay...@penbaysolutions.com
www.penbaysolutions.com

-----Original Message-----
From: Ryan Taylor [mailto:rtay...@penbaysolutions.com]
Sent: Friday, November 12, 2010 10:39 AM
To: General discussion for Windows Installer XML toolset.
Subject: [WiX-users] How to check for the existence of an IIS 7 web site?

Hello again,

I am trying to check for the existence of an IIS 7 web site. The web site 
description is passed in to the MSI as a parameter. I want to cancel the 
installation if the web site does not already exist. Additionally, I want the 
uninstall to continue even if the web site cannot be found, however, if found, 
I need to run a custom action.

I have tried to create a condition based WebSite/@Id but I am not able to 
successfully check for the existence (or lack of) the website in the condition, 
any thoughts?

Example:
<!-- WEBSITE is passed in via a parameter on the command line -->
<iis:WebSite Id="IISWEBSITE" Description="[WEBSITE]" SiteId="*">
        <iis:WebAddress Id="IisWebAddress" Port="80"/>
</iis:WebSite>

<Condition Message="Website [WEBSITE] not found.">
        <![CDATA[IISWEBSITE]]>
</Condition>


Ryan Taylor
Office (207)-504-5294
rtay...@penbaysolutions.com
www.penbaysolutions.com



CONFIDENTIALITY NOTICE:
This e-mail message, including any attachments, is for the sole use of the 
intended recipient(s) and may contain confidential and privileged information. 
Any unauthorized review, use, disclosure or distribution is prohibited. If you 
are not the intended recipient, please do not read, disclose, reproduce, 
distribute, disseminate or otherwise use this transmission, but contact the 
sender by reply e-mail and destroy all copies of the message and its 
attachments.

------------------------------------------------------------------------------
Centralized Desktop Delivery: Dell and VMware Reference Architecture
Simplifying enterprise desktop deployment and management using
Dell EqualLogic storage and VMware View: A highly scalable, end-to-end
client virtualization framework. Read more!
http://p.sf.net/sfu/dell-eql-dev2dev
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

CONFIDENTIALITY NOTICE:
This e-mail message, including any attachments, is for the sole use of the 
intended recipient(s) and may contain confidential and privileged information. 
Any unauthorized review, use, disclosure or distribution is prohibited. If you 
are not the intended recipient, please do not read, disclose, reproduce, 
distribute, disseminate or otherwise use this transmission, but contact the 
sender by reply e-mail and destroy all copies of the message and its 
attachments.

------------------------------------------------------------------------------
Beautiful is writing same markup. Internet Explorer 9 supports
standards for HTML5, CSS3, SVG 1.1,  ECMAScript5, and DOM L2 & L3.
Spend less time writing and  rewriting code and more time creating great
experiences on the web. Be a part of the beta today
http://p.sf.net/sfu/msIE9-sfdev2dev
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to