Wix Setup

Mircot

Mitglied
Hallo,

ich bin auf der Suche nach einem Beispiel wie ich mit Wix eine Website automatisch in die IIS-Root Directory installieren kann, also nicht über den Pfad c:\inetpup\wwwroot, sonder über eine Systemvariable, die den IISRoot selbst auflöst.

Hat jemand eine Idee?


Mfg Mirco
 
Ok, geholfen hat mir das schon, trotzdem habe ich mein Ziel nicht erreicht.

Ich hole mal weiter aus. Ich möchte auf einem IIS einen Webservice installieren aber vor den Webserviceordner noch einen Ordner mit den Instanznamen einfügen, den ich zur Setupzeit benenne.

Ein Formular habe ich dafür schon gebaut und eingebunden.

Code:
  <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" />

      
      <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="999">1</Publish>
      <Publish Dialog="WelcomeDlg" Control="Next" Event="NewDialog" Value="InstanzNameDlg">1</Publish>
      <Publish Dialog="InstanzNameDlg" Control="Back" Event="NewDialog" Value="WelcomeDlg">1</Publish>
      <Publish Dialog="InstanzNameDlg" Control="Next" Event="NewDialog" Value="InstallDirDlg">1</Publish>

      <Publish Dialog="InstallDirDlg" Control="Back" Event="NewDialog" Value="InstanzNameDlg">1</Publish>
      <Publish Dialog="InstallDirDlg" Control="Next" Event="SetTargetPath" Value="[WIXUI_INSTALLDIR]" Order="1">1</Publish>
      <Publish Dialog="InstallDirDlg" Control="Next" Event="NewDialog" Value="VerifyReadyDlg" Order="2">1</Publish>
      <Publish Dialog="InstallDirDlg" Control="ChangeFolder" Property="_BrowseProperty" Value="[WIXUI_INSTALLDIR]" Order="1">1</Publish>
      <Publish Dialog="InstallDirDlg" Control="ChangeFolder" Event="SpawnDialog" Value="BrowseDlg" Order="2">1</Publish>
    
      <Publish Dialog="VerifyReadyDlg" Control="Back" Event="NewDialog" Value="InstallDirDlg" Order="1">NOT Installed</Publish>
      <Publish Dialog="VerifyReadyDlg" Control="Back" Event="NewDialog" Value="MaintenanceTypeDlg" Order="2">Installed</Publish>
      <Publish Dialog="MaintenanceWelcomeDlg" Control="Next" Event="NewDialog" Value="MaintenanceTypeDlg">1</Publish>
      <Publish Dialog="MaintenanceTypeDlg" Control="RepairButton" Event="NewDialog" Value="VerifyReadyDlg">1</Publish>
      <Publish Dialog="MaintenanceTypeDlg" Control="RemoveButton" Event="NewDialog" Value="VerifyReadyDlg">1</Publish>
      <Publish Dialog="MaintenanceTypeDlg" Control="Back" Event="NewDialog" Value="MaintenanceWelcomeDlg">1</Publish>
      
      <Dialog Id="InstanzNameDlg" Width="370" Height="270" Title="[ProductName] Setup">
        <Control Id="Title" Type="Text" X="15" Y="6" Width="200" Height="15" Transparent="yes" NoPrefix="yes" Text="{\WixUI_Font_Title}User Information" />
        <Control Id="Description" Type="Text" X="25" Y="23" Width="280" Height="15" Transparent="yes" NoPrefix="yes" Text="Enter the following information to personalize your installation" />
        <Control Id="BannerBitmap" Type="Bitmap" X="0" Y="0" Width="370" Height="44" TabSkip="no" Text="!(loc.InstallDirDlgBannerBitmap)" />
        <Control Id="BannerLine" Type="Line" X="0" Y="44" Width="370" Height="0" />
        <Control Id="InstanzName" Type="Edit" X="20" Y="142" Width="320" Height="15" Property="INSTALLDIR" />
        <Control Id="InstanzNameLabel" Type="Text" X="20" Y="126" Width="290" Height="13" Text="InstanzName:" />
        <Control Id="BottomLine" Type="Line" X="0" Y="234" Width="370" Height="0" />
        <Control Id="Next" Type="PushButton" X="236" Y="243" Width="56" Height="17" Default="yes" Text="Next" />
        <Control Id="Back" Type="PushButton" X="180" Y="243" Width="56" Height="17" Text="Back" />
        <Control Id="Cancel" Type="PushButton" X="304" Y="243" Width="56" Height="17" Cancel="yes" Text="Cancel">
          <Publish Event="SpawnDialog" Value="CancelDlg">1</Publish>
        </Control>
        <Control Type="Text" Id="Comment" Width="317" Height="36" X="25" Y="64">
          <Text>Please define the Instance Name.</Text>
        </Control>
      </Dialog>
 

    </UI>
Dir Propertys und Directorys habe ich wie folget bestimmt...

Code:
    <Property Id="IISROOT" Value="#0">
      <RegistrySearch Id="IISROOT" Type="raw" Root="HKLM" Key="Software\Microsoft\InetStp" Name="PathWWWRoot" />
    </Property>

    <Property Id="INSTALLDIR" Value="StandartInstanz"/>
    
    <Property Id="WIXUI_INSTALLDIR" Value="IISROOT" />

    <Property Id="ARPNOMODIFY" Value="1" />

    <WixVariable Id="WixUIBannerBmp" Value="ProjektItems\Banner.bmp" />

    <Media Id="1" Cabinet="media1.cab" EmbedCab="yes" />

    <Directory Id="TARGETDIR" Name="SourceDir">
      <Directory Id="ProgramFilesFolder" Name="PFiles">
        
        <Directory Id="IISROOT" Name=".">
          <Directory Id="INSTALLDIR"  Name="Test">
            <Directory Id="_144bdfda09504362a71b83e43a1e17dd" Name="services">
              <Component Id="C__43593ab561184c0d97d178f54578b57b" Guid="{74269968-8bd8-4bcf-b5f6-ee51e311edf9}">
                <File Id="_43593ab561184c0d97d178f54578b57b" Name="AdminService.asmx" KeyPath="yes" DiskId="1" Source=" " />
              </Component>
            </Directory>
          </Directory>
         </Directory>
        
    </Directory>
    </Directory>
Was ich nicht hinbekomme, den Ordner INSTALLDIR so zu benennen, wie es im Formular angegeben wird. Wenn ich <Directory Id="INSTALLDIR" Name="INSTALLDIR"> schreibe nimmt er wohl das Property, aber vergisst alle vorgelagerten Ordner. Er kann dann auf die Netzwerkressource nicht zugreifen.

Hat jemand schon mal sowas gemacht?
 
Zurück