Yet more information.
When I include a component that contains a WebVirtualDir element (shown below)
a ConfigureIIs action is added to the MSI's launch sequence as seen via ORCA.
If the website cannot be found the installer silently fails and rolls back. If
the website is found, the installation continues and the virtual directory is
added to the website.
It seems that a direct or indirect reference to the Website element must be
made in the Feature element in order for the check to take place.
Unfortunately, this is not the behavior I am looking for. I do not want to
create a virtual directory. I simply want to verify that a website exists and
if it does, obtain its site ID.
<!-- Code snippet that verifies that a website exists, but creates a virtual
directory -->
<DirectoryRef Id="TARGETDIR">
<Component Id="VirtualDirectoryTest"
Guid="2AB79E34-19A8-4244-8DB0-E1D43C685745">
<iis:WebVirtualDir Id="VirDirTest"
Alias="VirDirTest"
Directory="ScriptsLocation"
WebSite="TestWebsite"/>
</Component>
</DirectoryRef>
<Feature Id="Complete" Title="Complete" Level="1">
<ComponentRef Id="RegisterHttpModulePS1" />
<ComponentRef Id="VirtualDirectoryTest"/> -->
</Feature>
Ryan Taylor
Office (207)-504-5294
[email protected]
www.penbaysolutions.com
-----Original Message-----
From: Ryan Taylor [mailto:[email protected]]
Sent: Tuesday, November 16, 2010 12:52 PM
To: General discussion for Windows Installer XML toolset.
Subject: Re: [WiX-users] How to check for the existence of an IIS 7 web site?
A little more information to add to the mix. Using ORCA I can see that
IIsWebAddress and IIsWebSite tables are added to the MSI. The values are:
IIsWebsite
WEB: IISWEBSITE
Description: Default Web Site
KeyAddress: IisWebAddress
Id: -1
IIsWebAddress
Address: IisWebAddress
Web_: IISWEBSITE
Port: 1
Secure: 0
I also modified the XML a little:
<iis:WebSite Id="IISWEBSITE" Description="Default Web Site" SiteId="*">
<iis:WebAddress Id="IisWebAddress" Port="1"/>
</iis:WebSite>
<Condition Message="Website [IISWEBSITE] not found.">
<![CDATA[IISWEBSITE]]>
</Condition>
With the above code, the installation is halted with the error message "Website
not found". It appears that IISWEBSITE is never getting set. Though, I know
that "Default Web Site" exists. I know that I must be missing something, but
what?
Can I not use the WebSite/@ID as a property in a condition? Is a condition
required to validate that the website exists?
Note: This question has also been asked here:
http://stackoverflow.com/questions/4197219/how-to-check-for-the-existence-of-an-iis-7-web-site-via-wix-3-5
Ryan Taylor
Office (207)-504-5294
[email protected]
www.penbaysolutions.com
-----Original Message-----
From: Ryan Taylor [mailto:[email protected]]
Sent: Tuesday, November 16, 2010 10:56 AM
To: General discussion for Windows Installer XML toolset.
Subject: Re: [WiX-users] How to check for the existence of an IIS 7 web site?
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
[email protected]
www.penbaysolutions.com
-----Original Message-----
From: Ryan Taylor [mailto:[email protected]]
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
[email protected]
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
[email protected]
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
[email protected]
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
[email protected]
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/wix-users