2010-02-11 34 views
5

Tôi có thuộc tính trong tệp Wix được hiển thị để chỉnh sửa trong hộp thoại. Trong ví dụ bên dưới, đó là "MyProperty". Thuộc tính này được sử dụng để tạo khóa đăng ký. Tuy nhiên, nếu thuộc tính được thay đổi trong hộp thoại, giá trị thay đổi không được sử dụng, nhưng giá trị mặc định là: "SomeProperty". Tuy nhiên, nếu tôi hiển thị thuộc tính trên một hộp thoại khác, giá trị được hiển thị dưới dạng giá trị mà người dùng đã nhập.Wix: Thay đổi thuộc tính trong hộp thoại bị bỏ qua trong khi cài đặt

Tôi đang làm gì sai?

<?xml version="1.0" encoding="utf-8"?> 
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"> 
    <Product Id="221ca977-6b1b-4737-a06a-14122f707173" Name="Name" Language="1033" Version="1.0.0.0" Manufacturer="Manu" UpgradeCode="29ad8ab9-e354-46fa-bafa-85cbea5ae526"> 
    <Package InstallerVersion="200" Compressed="yes" /> 
    <Media Id="1" Cabinet="media1.cab" EmbedCab="yes" /> 
    <Property Id="MyProperty" Value="SomeProperty" /> 
    <Directory Id="TARGETDIR" Name="SourceDir"> 
     <Component Id="RegistryEntries" Guid="8713D23C-1887-45C1-A90B-C8D0AAFFDA3D"> 
     <!-- This registry key is always "Software\SomeProperty" --> 
      <RegistryKey Id="Test" Root="HKLM" Key="Software\[MyProperty]" Action="createAndRemoveOnUninstall"/> 
     </Component> 
    </Directory> 
    <Feature Id="Feature1" Level="1" Title="Feature"> 
     <ComponentRef Id="RegistryEntries" /> 
    </Feature> 
    <UI> 
     <UIRef Id="WixUI_Common" /> 

     <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="PropertySettingDlg">1</Publish> 

     <Publish Dialog="PropertySettingDlg" Control="Back" Event="NewDialog" Value="WelcomeDlg">1</Publish> 
     <Publish Dialog="PropertySettingDlg" Control="Next" Event="EndDialog" Value="Return">1</Publish> 

     <Dialog Id="PropertySettingDlg" Width="370" Height="270" Title="PropertySettingDlg" TrackDiskSpace="yes"> 
     <Control Id="PropertyLabel" Type="Text" X="22" Y="52" Width="290" Height="13" Text="My Property" /> 
     <Control Id="Property" Type="Edit" X="22" Y="64" Width="150" Height="15" Property="MyProperty" /> 
     <Control Id="Back" Type="PushButton" X="192" Y="243" Width="56" Height="17" Text="!(loc.WixUIBack)" /> 
     <Control Id="Next" Type="PushButton" X="248" Y="243" Width="56" Height="17" Default="yes" Text="!(loc.WixUINext)" /> 
     </Dialog> 
    </UI> 
    </Product> 
</Wix> 

Trả lời

8

tài sản của bạn cần phải được cả hai Publicsecure

<Property Id="MYPROPERTY" Value="SomeProperty" Secure="yes" /> 
+0

Bạn có muốn thử trả lời một câu hỏi Wix khác không? http://stackoverflow.com/questions/19355537/wix-setting-install-folder-correctly/ –

+0

Vẫn không hoạt động đối với tôi, @OP đã khắc phục sự cố cho bạn chưa? – Bishoy

2

Tôi tin rằng bạn cần sử dụng public windows installer property. Thuộc tính công khai là tất cả các mũ, ví dụ: [MYPROPERTY].

+0

Bạn có muốn thử trả lời một câu hỏi khác Wix? http://stackoverflow.com/questions/19355537/wix-setting-install-folder-correctly/ –

Các vấn đề liên quan