[WiX-users] Website selection from combo box creates virtual directory always in the default website
I'm new to Wix. I'm trying to make a installer for website - something similar to what visual studio IDE provides. I've tried using the two scripts mentioned in the posts here to populate the combo box with the websites available on a machine as well as set the port of the in the WebAddress element using the script given here. Initially, the installation was failing with the error message ConfigureIIs: Error 0x8007000d: invalid port provided for web site: ConfigureIIs: Error 0x8007000d: failed to read IIsWebSite table Error 26002. Failed to read IIsWebSite table. (-2147024883 ) Now, the installation creates the virtual directory always in the default website. I don't know where I'm going wrong. Please guide me as to how do i resolve the issue. Also please let me know if I'm following a correct approach. Sorry for the long post and I appreciate any help that comes this way. The following are the files I'm using Test.wxs: ?xml version=1.0 encoding=UTF-8? Wix xmlns=http://schemas.microsoft.com/wix/2006/wi; xmlns:iis=http://schemas.microsoft.com/wix/IIsExtension; xmlns:ui=http://schemas.microsoft.com/wix/WixUIExtension; Product Id=7b523f47-ef58-4d3c-8ca1-fea6be516471 Name=My Product Language=1033 Version=1.0.0.0 Manufacturer=Personal Co UpgradeCode=0a8c10df-fe3e-4aec-8954-50b9ecdb0a41 Package InstallerVersion=100 Compressed=yes / Icon Id=icon.ico SourceFile=tray.ico/ Property Id=ProductIcon Value=icon.ico / Condition Message=Only an Administrator can install this application Privileged /Condition Condition Message=Windows Server 2003 is required VersionNT = 502 /Condition PropertyRef Id=NETFRAMEWORK20/ Condition Message=The .NET Framework 2.0 or higher must be installed Installed OR NETFRAMEWORK20 /Condition PropertyRef Id=IISMAJORVERSION/ Condition Message=IIS version 5 or higher must be installed Installed OR (IISMAJORVERSION = #5) /Condition Media Id=1 Cabinet=WebAppWixProject.cab EmbedCab=yes / Directory Id=TARGETDIR Name=SourceDir Directory Id=ProgramFilesFolder Directory Id=PersonalCo Name=Personal Co. Directory Id=INSTALLLOCATION Name=TestApplication Component Id=TestComponent DiskId=1 Guid=80b0ee2a-a102-46ec-a456-33a23eb0588e File Id=Error.aspx Name=Error.aspx Source=Error.aspx / File Id=Login.aspx Name=Login.aspx Source=Login.aspx / iis:WebVirtualDir Id=MyWebApp Alias=TestApplication Directory=INSTALLLOCATION WebSite=DefaultWebSite iis:WebApplication Id=TestWebApplication Name=TestApplication / /iis:WebVirtualDir /Component /Directory /Directory /Directory /Directory iis:WebSite Id='DefaultWebSite' Description='[WebsiteCombo]' Directory='INSTALLLOCATION' iis:WebAddress Id=AllUnassigned Port=[WebsiteComboIP] / /iis:WebSite Feature Id=ProductFeature Title=Test Application Level=1 ComponentRef Id=TestComponent / /Feature UIRef Id=WixUI_Common / UI Property Id=DefaultUIFont Value=WixUI_Font_Normal / TextStyle Id=WixUI_Font_Normal FaceName=Tahoma Size=8 / TextStyle Id=WixUI_Font_Bigger FaceName=Tahoma Size=12 / TextStyle Id=WixUI_Font_Title FaceName=Tahoma Size=9 Bold=yes / Property Id=WIXUI_INSTALLDIR Value=INSTALLLOCATION / Property Id=PIDTemplate Value=--- / Property Id=ARPNOMODIFY Value=1 / DialogRef Id=BrowseDlg / DialogRef Id=DiskCostDlg / DialogRef Id=ErrorDlg / DialogRef Id=FatalError / DialogRef Id=FilesInUse / DialogRef Id=MsiRMFilesInUse / DialogRef Id=PrepareDlg / DialogRef Id=ProgressDlg / DialogRef Id=ResumeDlg / DialogRef Id=UserExit / Publish Dialog=ExitDialog Control=Finish Event=EndDialog Value=Return Order=9991/Publish Publish Dialog=WelcomeDlg Control=Next Event=NewDialog Value=LicenseAgreementDlg1/Publish Publish Dialog=LicenseAgreementDlg Control=Back Event=NewDialog Value=WelcomeDlg1/Publish Publish Dialog=LicenseAgreementDlg Control=Next Event=DoAction Value=GetIISSites Order=1LicenseAccepted = 1/Publish Publish Dialog=LicenseAgreementDlg Control=Next Event=NewDialog Value=LicenseKeyDlg Order=2LicenseAccepted = 1/Publish Publish Dialog=LicenseKeyDlg Control=Back Event=NewDialog Value=LicenseAgreementDlg1/Publish Publish Dialog=LicenseKeyDlg Control=Next Event=ValidateProductID Value=[PIDKEY] Order=11/Publish Publish Dialog=LicenseKeyDlg Control=Next Event=DoAction Value=ConfigureIISSite Order=2NOT Installed/Publish Publish Dialog=LicenseKeyDlg Control=Next Event=NewDialog Value=InstallDirDlg Order=3ProductID/Publish Publish Dialog=InstallDirDlg Control=Back Event=NewDialog Value=LicenseKeyDlg1/Publish Publish Dialog=InstallDirDlg Control=Next Event=SetTargetPath Value=[WIXUI_INSTALLDIR] Order=11/Publish Publish Dialog=InstallDirDlg
Re: [WiX-users] WebSites in ComboBox dynamically
Hello Alexei and All, I'm new to Wix. I'm trying to make a installer for website - something similar to what visual studio IDE provides. I've tried using the two scripts mentioned in the posts here to populate the combo box with the websites available on a machine as well as set the port of the in the WebAddress element using the script given here. But my installation is failing with the error message ConfigureIIs: Error 0x8007000d: invalid port provided for web site: ConfigureIIs: Error 0x8007000d: failed to read IIsWebSite table Error 26002. Failed to read IIsWebSite table. (-2147024883 ) I don't know where I'm going wrong. Please guide me as to how do i set the website port correctly. The following are the files i'm using Test.wxs: ?xml version=1.0 encoding=UTF-8? Wix xmlns=http://schemas.microsoft.com/wix/2006/wi; xmlns:iis=http://schemas.microsoft.com/wix/IIsExtension; xmlns:ui=http://schemas.microsoft.com/wix/WixUIExtension; Product Id=7b523f47-ef58-4d3c-8ca1-fea6be516471 Name=My Product Language=1033 Version=1.0.0.0 Manufacturer=Personal Co UpgradeCode=0a8c10df-fe3e-4aec-8954-50b9ecdb0a41 Package InstallerVersion=100 Compressed=yes / Icon Id=icon.ico SourceFile=tray.ico/ Property Id=ProductIcon Value=icon.ico / Condition Message=Only an Administrator can install this application Privileged /Condition Condition Message=Windows Server 2003 is required VersionNT = 502 /Condition PropertyRef Id=NETFRAMEWORK20/ Condition Message=The .NET Framework 2.0 or higher must be installed Installed OR NETFRAMEWORK20 /Condition PropertyRef Id=IISMAJORVERSION/ Condition Message=IIS version 5 or higher must be installed Installed OR (IISMAJORVERSION = #5) /Condition Media Id=1 Cabinet=WebAppWixProject.cab EmbedCab=yes / Directory Id=TARGETDIR Name=SourceDir Directory Id=ProgramFilesFolder Directory Id=PersonalCo Name=Personal Co. Directory Id=INSTALLLOCATION Name=TestApplication Component Id=TestComponent DiskId=1 Guid=80b0ee2a-a102-46ec-a456-33a23eb0588e File Id=Error.aspx Name=Error.aspx Source=Error.aspx / File Id=Login.aspx Name=Login.aspx Source=Login.aspx / iis:WebVirtualDir Id=MyWebApp Alias=TestApplication Directory=INSTALLLOCATION WebSite=DefaultWebSite iis:WebApplication Id=TestWebApplication Name=TestApplication / /iis:WebVirtualDir /Component /Directory /Directory /Directory /Directory iis:WebSite Id='DefaultWebSite' Description='[WebsiteCombo]' Directory='INSTALLLOCATION' iis:WebAddress Id=AllUnassigned Port=[WebsiteComboIP] IP=[WebsiteComboIA] / /iis:WebSite Feature Id=ProductFeature Title=registeR4Health - Provider Application Level=1 ComponentRef Id=TestComponent / /Feature UIRef Id=WixUI_Common / UI Property Id=DefaultUIFont Value=WixUI_Font_Normal / TextStyle Id=WixUI_Font_Normal FaceName=Tahoma Size=8 / TextStyle Id=WixUI_Font_Bigger FaceName=Tahoma Size=12 / TextStyle Id=WixUI_Font_Title FaceName=Tahoma Size=9 Bold=yes / Property Id=WIXUI_INSTALLDIR Value=INSTALLLOCATION / Property Id=PIDTemplate Value=--- / Property Id=ARPNOMODIFY Value=1 / DialogRef Id=BrowseDlg / DialogRef Id=DiskCostDlg / DialogRef Id=ErrorDlg / DialogRef Id=FatalError / DialogRef Id=FilesInUse / DialogRef Id=MsiRMFilesInUse / DialogRef Id=PrepareDlg / DialogRef Id=ProgressDlg / DialogRef Id=ResumeDlg / DialogRef Id=UserExit / Publish Dialog=ExitDialog Control=Finish Event=EndDialog Value=Return Order=9991/Publish Publish Dialog=WelcomeDlg Control=Next Event=NewDialog Value=LicenseAgreementDlg1/Publish Publish Dialog=LicenseAgreementDlg Control=Back Event=NewDialog Value=WelcomeDlg1/Publish Publish Dialog=LicenseAgreementDlg Control=Next Event=DoAction Value=GetIISSites Order=1LicenseAccepted = 1/Publish Publish Dialog=LicenseAgreementDlg Control=Next Event=NewDialog Value=LicenseKeyDlg Order=2LicenseAccepted = 1/Publish Publish Dialog=LicenseKeyDlg Control=Back Event=NewDialog Value=LicenseAgreementDlg1/Publish Publish Dialog=LicenseKeyDlg Control=Next Event=ValidateProductID Value=[PIDKEY] Order=11/Publish Publish Dialog=LicenseKeyDlg Control=Next Event=DoAction Value=ConfigureIISSite Order=21/Publish Publish Dialog=LicenseKeyDlg Control=Next Event=NewDialog Value=InstallDirDlg Order=3ProductID/Publish Publish Dialog=InstallDirDlg Control=Back Event=NewDialog Value=LicenseKeyDlg1/Publish Publish Dialog=InstallDirDlg Control=Next Event=SetTargetPath Value=[WIXUI_INSTALLDIR] Order=11/Publish Publish Dialog=InstallDirDlg Control=Next Event=NewDialog