2013-04-29 3 views
1

나는 윅스를 처음 사용합니다. Wix3.0을 사용합니다.응용 프로그램을 제거한 후 설치된 응용 프로그램 폴더를 삭제해야합니까?

"C : \ Program Files \ MyWix \"경로에 설치되어 있고 MyWix 폴더에 대해 GenericWrite = "yes"권한이 주어진 하나의 msi를 만들었습니다.

제거 된 msi 이후에 문제가 있습니다. MyWix 폴더 및 포함 된 파일은 삭제되지 않습니다. 심지어 MyWix 폴더를 수동으로 삭제할 수 없습니다. 이 폴더를 삭제할 수있는 권한이 없다는 말입니다.

내 코드는 아래와 같습니다.,

<?xml version="1.0" encoding="UTF-8"?> 
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"> 
    <Product Id="b3fd2c4b-7ea3-415f-975a-2f8245c5d862" Name="MyWix" Language="1033" Version="1.0.0.0" Manufacturer="MyWix" UpgradeCode="f0094887-e58c-48f7-bbf1-0e60ad7c66f9"> 
     <Package InstallerVersion="200" Compressed="yes" /> 

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

     <Directory Id="TARGETDIR" Name="SourceDir"> 
      <Directory Id="ProgramFilesFolder"> 
       <Directory Id="INSTALLLOCATION" Name="MyWix"> 

      <Component Id="test" Guid=""> 
      <File Id="test1" Name="test.docx" Source="D:\RenewDCP.docx" KeyPath="yes"></File> 
      </Component> 
       </Directory> 
      </Directory> 
     </Directory> 
    <Component Id="MyWix" Directory="INSTALLLOCATION" Guid="{20D7541C-15A7-4c29-8FDE-14DAF191A959}"> 
     <CreateFolder> 
     <Permission GenericWrite="yes" User="Everyone"/> 
     </CreateFolder> 
    </Component> 

    <CustomAction Id="InstallSetProp" Property="Install" Value="/installtype=transaction /action=install " /> 
    <CustomAction Id="UnInstallSetProp" Property="Uninstall" Value="/installtype=transaction /action=uninstall" /> 

     <Feature Id="ProductFeature" Title="MyWix" Level="1" ConfigurableDirectory="INSTALLLOCATION"> 
      <!-- TODO: Remove the comments around this ComponentRef element and the Component above in order to add resources to this installer. --> 
      <!-- <ComponentRef Id="ProductComponent" /> --> 
     <ComponentRef Id="MyWix"/> 
     <ComponentRef Id="test"/> 
     </Feature> 
    <UIRef Id="WixUI_Common"/> 
    <Property Id="DefaultUIFont" Value="WixUI_Font_Normal" /> 
    <Property Id="ARPNOMODIFY" Value="1" /> 
    <Property Id="WixAppFolder" Value="WixPerUserFolder" /> 
    <Property Id="WIXUI_INSTALLDIR" Value="INSTALLLOCATION" /> 
    <WixVariable Id="WixUISupportPerMachine" Value="1" /> 
    <WixVariable Id="WixUISupportPerUser" Value="1" /> 
    <WixVariable Id="WixUIBannerBmp" Value="Images\Banner.bmp" /> 
    <WixVariable Id="WixUIDialogBmp" Value="Images\Dialog.bmp" /> 
    <InstallExecuteSequence> 
     <LaunchConditions After="AppSearch" /> 
     <Custom Action="InstallSetProp" After="InstallFiles">$MyWix&gt;2</Custom> 
     <Custom Action="UnInstallSetProp" After="MsiUnpublishAssemblies">$MyWix=2</Custom> 
     <RemoveExistingProducts After="InstallFinalize" /> 
     <ScheduleReboot After="InstallFinalize" /> 
    </InstallExecuteSequence> 
    <UI Id="WixUI_Advanced"> 
     <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="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="999">1</Publish> 
     <Publish Dialog="WelcomeDlg" Control="Next" Event="NewDialog" Value="LicenseAgreementDlg">1</Publish> 
     <Publish Dialog="LicenseAgreementDlg" Control="Back" Event="NewDialog" Value="WelcomeDlg">1</Publish> 
     <Publish Dialog="LicenseAgreementDlg" Control="Next" Event="NewDialog" Value="InstallScopeDlg">1</Publish> 
     <Publish Dialog="InstallScopeDlg" Control="Back" Event="NewDialog" Value="LicenseAgreementDlg">1</Publish> 
     <Publish Dialog="InstallScopeDlg" Control="Next" Property="ALLUSERS" Order="1" Value="{}">WixAppFolder = "WixPerUserFolder"</Publish> 
     <Publish Dialog="InstallScopeDlg" Control="Next" Property="ALLUSERS" Order="2" Value="1">WixAppFolder = "WixPerMachineFolder"</Publish> 
     <Publish Dialog="InstallScopeDlg" Control="Next" Event="NewDialog" Value="InstallDirDlg">1</Publish> 
     <Publish Dialog="InstallDirDlg" Control="Back" Event="NewDialog" Value="InstallScopeDlg">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> 
    </UI> 

    </Product> 
</Wix> 

PLZ 날을 제안한다.

답변

1

GenericWrite 대신 GenericAll을 사용하면 설치 폴더에 대한 모든 권한을가집니다.

<Permission GenericAll="yes" User="Everyone"/> 
3

당신은 아마 SYSTEMAdministrators 여전히 폴더를 조작 할 수 있도록 할 것입니다. 위의 코드에서 남은 유일한 사용 권한은 write입니다. 시도해 볼 수 있습니다 :

<Component Id="MyWix" Directory="INSTALLLOCATION" Guid="{20D7541C-15A7-4c29-8FDE-14DAF191A959}"> 
    <CreateFolder> 
    <Permission GenericWrite="yes" User="Everyone"/> 
    <Permission GenericAll="yes" User="SYSTEM"/> 
    <Permission GenericAll="yes" User="Administrators"/> 
    </CreateFolder> 
</Component>