2016-06-30 13 views
-1

Ich habe ein (einfaches) Wix-Projekt. Im Projekt habe ich eine Eigenschaft, die ihren Wert aus der Registrierung bezieht (wenn ein solcher Registrierungsschlüssel existiert). In einem Dialog sieht der Benutzer den Wert dieser Eigenschaft und kann ihn dann ändern. Aus irgendeinem Grund kann ich nicht sehen, dass die Eigenschaft den Wert aus der Registrierung bekommt ... Wird Ihre Hilfe zu schätzen wissen:Wix-Installer - mit der gleichen Eigenschaft zum Lesen von der Registrierung und Einstellung während der UI

vom wix Projekt:

<!-- The Registry group of the installation package. --> 
<ComponentGroup Id="RegistryGroup">  
    <Component Id="_70B15100_F11D_48BF_8349_3E3B83157C54" Guid="2F344400-5C37-4CAE-902E-7100FDD2DB22" Transitive="no" Directory="TARGETDIR"> 
    <RegistryKey Root="HKLM" Key="Software\[Manufacturer]\YYY" ForceCreateOnInstall="no" ForceDeleteOnUninstall="no"> 

     <RegistryValue Type="string" Name="ServerPort" Value="[SERVERPORT]" /> 
     <RegistryValue Type="string" Name="ServerAddress" Value="[SERVERADDRESS]" /> 

    </RegistryKey> 
    </Component> 
</ComponentGroup> 
<!-- The composite feature of the installation package. --> 
<Feature Id="CompleteInstall" Title="All Files" Level="1"> 
    <ComponentGroupRef Id="FileSystemGroup" /> 
    <ComponentGroupRef Id="RegistryGroup" /> 
</Feature> 
<Upgrade Id="{D627BB25-59CB-4387-AF42-0127AC701DBE}"> 
    <UpgradeVersion Minimum="3.11.7" Property="NEWPRODUCTFOUND" OnlyDetect="yes" IncludeMinimum="no" Language="1033" /> 
    <UpgradeVersion Maximum="3.11.7" Property="OLDPRODUCTFOUND" OnlyDetect="no" IncludeMinimum="yes" IncludeMaximum="no" Language="1033" /> 
</Upgrade> 
<InstallExecuteSequence> 
    <Custom Action="CA_CreateConfig" Sequence="1" /> 
    <Custom Action="DIRCA_TARGETDIR" Before="CostInitialize"><![CDATA[TARGETDIR = ""]]></Custom> 
    <Custom Action="PreventDowngrading" After="FindRelatedProducts"><![CDATA[NEWPRODUCTFOUND]]></Custom> 
    <Custom Action="_C976A2F6_5EC5_4EE5_898C_4A660FC42C9F.Commit.SetProperty" After="StartServices"><![CDATA[(NOT DISABLESERVICE) AND $com_DCAB0809_69B4_442E_82E5_E600A7E1E769>2]]></Custom> 
    <Custom Action="_C976A2F6_5EC5_4EE5_898C_4A660FC42C9F.Commit" After="_C976A2F6_5EC5_4EE5_898C_4A660FC42C9F.Commit.SetProperty"><![CDATA[(NOT DISABLESERVICE) AND $com_DCAB0809_69B4_442E_82E5_E600A7E1E769>2]]></Custom> 
    <Custom Action="_458FD9FC_2B2B_45E5_B89F_E5C67FA1AB86.Install.SetProperty" After="_C976A2F6_5EC5_4EE5_898C_4A660FC42C9F.Commit"><![CDATA[(NOT DISABLESERVICE) AND $com_DCAB0809_69B4_442E_82E5_E600A7E1E769>2]]></Custom> 
    <Custom Action="_458FD9FC_2B2B_45E5_B89F_E5C67FA1AB86.Install" After="_458FD9FC_2B2B_45E5_B89F_E5C67FA1AB86.Install.SetProperty"><![CDATA[(NOT DISABLESERVICE) AND $com_DCAB0809_69B4_442E_82E5_E600A7E1E769>2]]></Custom> 
    <Custom Action="_854AE351_70ED_4318_82B0_B079EDD6C3CD.Rollback.SetProperty" After="_458FD9FC_2B2B_45E5_B89F_E5C67FA1AB86.Install"><![CDATA[(NOT DISABLESERVICE) AND $com_DCAB0809_69B4_442E_82E5_E600A7E1E769>2]]></Custom> 
    <Custom Action="_854AE351_70ED_4318_82B0_B079EDD6C3CD.Rollback" After="_854AE351_70ED_4318_82B0_B079EDD6C3CD.Rollback.SetProperty"><![CDATA[(NOT DISABLESERVICE) AND $com_DCAB0809_69B4_442E_82E5_E600A7E1E769>2]]></Custom> 
    <Custom Action="_BEF9A9A6_06F8_43FA_85B9_F40521FCC587.Uninstall.SetProperty" After="MsiUnpublishAssemblies"><![CDATA[(NOT DISABLESERVICE) AND $com_DCAB0809_69B4_442E_82E5_E600A7E1E769=2]]></Custom> 
    <Custom Action="_BEF9A9A6_06F8_43FA_85B9_F40521FCC587.Uninstall" After="_BEF9A9A6_06F8_43FA_85B9_F40521FCC587.Uninstall.SetProperty"><![CDATA[(NOT DISABLESERVICE) AND $com_DCAB0809_69B4_442E_82E5_E600A7E1E769=2]]></Custom> 
    <RemoveExistingProducts Before="InstallInitialize" /> 
    <Custom Action="CustomTextA_SetProperty_EDIT1" Sequence="701" /> 
    <Custom Action="CustomTextA_SetProperty_EDIT2" Sequence="702" /> 
    <Custom Action="CustomTextA_SetProperty_EDIT3" Sequence="703" /> 
    <Custom Action="CustomTextA_SetProperty_EDIT4" Sequence="704" /> 
</InstallExecuteSequence> 
<InstallUISequence> 
    <Custom Action="ERRCA_UIANDADVERTISED" Sequence="5"><![CDATA[ProductState=1]]></Custom> 
    <AppSearch Sequence="100" /> 
    <FindRelatedProducts Sequence="200" /> 
    <LaunchConditions Sequence="400"><![CDATA[NOT Installed]]></LaunchConditions> 
    <CCPSearch Sequence="500"><![CDATA[NOT Installed]]></CCPSearch> 
    <RMCCPSearch Sequence="600"><![CDATA[NOT Installed]]></RMCCPSearch> 
    <ValidateProductID Sequence="700" /> 
    <Custom Action="DIRCA_TARGETDIR" Before="CostInitialize"><![CDATA[TARGETDIR = ""]]></Custom> 
    <Custom Action="PreventDowngrading" After="FindRelatedProducts"><![CDATA[NEWPRODUCTFOUND]]></Custom> 
    <CostInitialize Sequence="800" /> 
    <FileCost Sequence="900" /> 
    <IsolateComponents Sequence="950"><![CDATA[RedirectedDllSupport]]></IsolateComponents> 
    <CostFinalize Sequence="1000" /> 
    <ExecuteAction Sequence="1300" /> 
    <Custom Action="CustomTextA_SetProperty_EDIT1" Sequence="701" /> 
    <Custom Action="CustomTextA_SetProperty_EDIT2" Sequence="702" /> 
    <Custom Action="CustomTextA_SetProperty_EDIT3" Sequence="703" /> 
    <Custom Action="CustomTextA_SetProperty_EDIT4" Sequence="704" /> 
    <Show Dialog="CustomTextA" Sequence="1001"><![CDATA[Installed="" AND NOT RESUME]]></Show> 
    <Show Dialog="ProgressForm" Sequence="1299" /> 
    <Show Dialog="FatalErrorForm" OnExit="error"><![CDATA[NOT HideFatalErrorForm]]></Show> 
    <Show Dialog="UserExitForm" OnExit="cancel" /> 
    <Show Dialog="FinishedForm" OnExit="success" /> 
    <Custom Action="VSDCA_FolderForm_AllUsers" Sequence="997"><![CDATA[Installed="" AND NOT RESUME AND ALLUSERS=1]]></Custom> 
    <Show Dialog="ResumeForm" Sequence="998"><![CDATA[Installed="" AND RESUME]]></Show> 
    <Show Dialog="MaintenanceForm" Sequence="999"><![CDATA[Installed<>""]]></Show> 
</InstallUISequence> 
<AdminUISequence> 
    <Custom Action="DIRCA_TARGETDIR" Before="CostInitialize"><![CDATA[TARGETDIR = ""]]></Custom> 
    <CostInitialize Sequence="800" /> 
    <FileCost Sequence="900" /> 
    <CostFinalize Sequence="1000" /> 
    <ExecuteAction Sequence="1300" /> 
    <Show Dialog="AdminWelcomeForm" Sequence="1001"><![CDATA[Installed="" AND NOT RESUME]]></Show> 
    <Show Dialog="AdminProgressForm" Sequence="1299" /> 
    <Show Dialog="AdminFatalErrorForm" OnExit="error" /> 
    <Show Dialog="AdminUserExitForm" OnExit="cancel" /> 
    <Show Dialog="AdminFinishedForm" OnExit="success" /> 
    <Show Dialog="AdminResumeForm" Sequence="998"><![CDATA[Installed="" AND RESUME]]></Show> 
    <Show Dialog="AdminMaintenanceForm" Sequence="999"><![CDATA[Installed<>""]]></Show> 
</AdminUISequence> 
<UI Id="Base"> 
    <Error Id="1001">Error [1]. [2]</Error> 
    <Property Id="VSDNETURLMSG" Value="This setup requires the .NET Framework version [1]. Please install the .NET Framework and run this setup again. The .NET Framework can be obtained from the web. Would you like to do this now?" /> 
    <Property Id="VSDIISMSG" Value="This setup requires Internet Information Server 5.1 or higher and Windows XP or higher. This setup cannot be installed on Windows 2000. Please install Internet Information Server or a newer operating system and run this setup again." /> 
    <Property Id="VSDUIANDADVERTISED" Value="This advertised application will not be installed because it might be unsafe. Contact your administrator to change the installation user interface option of the package to basic." /> 
    <Property Id="VSDNETMSG" Value="This setup requires the .NET Framework version [1]. Please install the .NET Framework and run this setup again." /> 
    <Property Id="VSDINVALIDURLMSG" Value="The specified path '[2]' is unavailable. The Internet Information Server might not be running or the path exists and is redirected to another machine. Please check the status of this virtual directory in the Internet Services Manager." /> 
    <Property Id="VSDVERSIONMSG" Value="Unable to install because a newer version of this product is already installed." /> 
</UI> 

<CustomAction Id="CustomTextA_SetProperty_EDIT1" Property="SERVERADDRESS" Value="[SERVERADDRESS]" Execute="firstSequence" /> 
<CustomAction Id="CustomTextA_SetProperty_EDIT2" Property="SERVERPORT" Value="[SERVERPORT]" Execute="firstSequence" /> 
<CustomAction Id="CustomTextA_SetProperty_EDIT3" Property="EDITA3" Value="" Execute="firstSequence" /> 
<CustomAction Id="CustomTextA_SetProperty_EDIT4" Property="EDITA4" Value="" Execute="firstSequence" /> 
<CustomAction Id="VSDCA_FolderForm_AllUsers" Property="FolderForm_AllUsers" Value="ALL" /> 
<CustomAction Id="ERRCA_UIANDADVERTISED" Error="[VSDUIANDADVERTISED]" /> 
<Property Id="CustomTextA_NextArgs" Value="EulaForm" /> 
<Property Id="EulaForm_PrevArgs" Value="CustomTextA" /> 
<Property Id="EulaForm_NextArgs" Value="WelcomeForm" /> 
<Property Id="WelcomeForm_PrevArgs" Value="EulaForm" /> 
<Property Id="WelcomeForm_NextArgs" Value="ConfirmInstallForm" /> 
<Property Id="ConfirmInstallForm_PrevArgs" Value="WelcomeForm" /> 
<UI Id="CustomText1Dlg"> 
    <Dialog Id="CustomTextA" X="50" Y="50" Width="373" Height="287" Title="[ProductName]"> 
    <Control Id="NextButton" Type="PushButton" X="300" Y="261" Width="66" Height="18" Text="{\VSI_MS_Sans_Serif13.0_0_0}&amp;Next &gt;" TabSkip="no" Default="yes"> 
     <Publish Event="EndDialog" Value="Return"><![CDATA[CustomTextA_NextArgs=""]]></Publish> 
     <Publish Event="NewDialog" Value="[CustomTextA_NextArgs]"><![CDATA[CustomTextA_NextArgs<>""]]></Publish> 
    </Control> 
    <Control Id="Label1" Type="Text" X="18" Y="108" Width="348" Height="12" Text="{\VSI_MS_Sans_Serif13.0_0_0}Server Address (leave empty for default)" TabSkip="no" /> 
    <Control Id="Edit1" Type="Edit" X="18" Y="120" Width="348" Height="18" Text="{\VSI_MS_Sans_Serif13.0_0_0}" TabSkip="no" Property="SERVERADDRESS" Sunken="yes" /> 
    <Control Id="Label2" Type="Text" X="18" Y="144" Width="348" Height="12" Text="{\VSI_MS_Sans_Serif13.0_0_0}Server Port (leave empty for default)" TabSkip="no" /> 
    <Control Id="Edit2" Type="Edit" X="18" Y="156" Width="348" Height="18" Text="{\VSI_MS_Sans_Serif13.0_0_0}" TabSkip="no" Property="SERVERPORT" Sunken="yes" /> 
    <Control Id="Label3" Type="Text" X="18" Y="180" Width="348" Height="12" Text="{\VSI_MS_Sans_Serif13.0_0_0}Edit3:" Hidden="yes" TabSkip="no" /> 
    <Control Id="Edit3" Type="Edit" X="18" Y="192" Width="348" Height="18" Text="{\VSI_MS_Sans_Serif13.0_0_0}" TabSkip="no" Property="EDITA3" Hidden="yes" Sunken="yes" /> 
    <Control Id="Label4" Type="Text" X="18" Y="216" Width="348" Height="12" Text="{\VSI_MS_Sans_Serif13.0_0_0}Edit4:" Hidden="yes" TabSkip="no" /> 
    <Control Id="Edit4" Type="Edit" X="18" Y="228" Width="348" Height="18" Text="{\VSI_MS_Sans_Serif13.0_0_0}" TabSkip="no" Property="EDITA4" Hidden="yes" Sunken="yes" /> 
    <Control Id="CancelButton" Type="PushButton" X="156" Y="261" Width="66" Height="18" Text="{\VSI_MS_Sans_Serif13.0_0_0}Cancel" TabSkip="no" Cancel="yes"> 
     <Publish Event="SpawnDialog" Value="Cancel" /> 
    </Control> 
    <Control Id="PreviousButton" Type="PushButton" X="228" Y="261" Width="66" Height="18" Text="{\VSI_MS_Sans_Serif13.0_0_0}&lt; &amp;Back" TabSkip="no"> 
     <Condition Action="disable"><![CDATA[CustomTextA_PrevArgs=""]]></Condition> 
     <Condition Action="enable"><![CDATA[CustomTextA_PrevArgs<>""]]></Condition> 
     <Publish Event="NewDialog" Value="[CustomTextA_PrevArgs]"><![CDATA[CustomTextA_PrevArgs<>""]]></Publish> 
    </Control> 
    <Control Id="BannerBmp" Type="Bitmap" X="0" Y="0" Width="375" Height="52" Text="_bbb3a8b4c218495cb88ea30ee85d4499" TabSkip="no" Disabled="yes" /> 
    <Control Id="BodyText" Type="Text" X="9" Y="63" Width="354" Height="42" Text="{\VSI_MS_Sans_Serif13.0_0_0}The installed agent will use the following connection properties." TabSkip="yes" NoPrefix="yes" /> 
    <Control Id="BannerText" Type="Text" X="9" Y="9" Width="306" Height="33" Text="{\VSI_MS_Sans_Serif16.0_1_0}Specify Connection Details" TabSkip="yes" Transparent="yes" NoPrefix="yes" /> 
    <Control Id="Control273" Type="Line" X="0" Y="252" Width="375" Height="6" Text="{\VSI_MS_Sans_Serif13.0_0_0}MsiHorizontalLine" TabSkip="yes" Disabled="yes" /> 
    <Control Id="Control278" Type="Line" X="0" Y="52" Width="375" Height="6" Text="{\VSI_MS_Sans_Serif16.0_1_0}MsiHorizontalLine" TabSkip="yes" Disabled="yes" /> 
    </Dialog> 
</UI> 

Antwort

1

Sie sagen, dass Sie den Wert der Eigenschaft aus der Registrierung bekommen, aber das erfordert ein RegistrySearch Element und es scheint nicht in Ihrer WiX Quelle zu sein.

+0

Ich konnte nicht die gesamte Datei, so dass ich nur die relevanten Zeilen zeigte. Die Aktion existiert – Dafna

+0

@Dafna Sie haben bereits eine Menge dieser Datei kopiert! Wie könnte ** diese Information ** nicht relevant sein? – Wolf

+0

Das Problem war, dass ich ein Werkzeug verwendet habe, das ein vs-Projekt in ein wix-Projekt umgewandelt hat und es falsch gemacht hat, zusätzliche unnötige Zeilen hinzuzufügen. – Dafna

0

Mein Problem war, dass ich ein Werkzeug verwendet, das automatisch meine vdproj zu einem Wix Projekt umgewandelt. Diese Konvertierung war nicht perfekt und es wurde eine benutzerdefinierte Aktion und eine Set-Eigenschaft erstellt, die ich nicht benötigte. Sobald diese gelöscht wurden, funktionierte alles perfekt.

Verwandte Themen