how to create INSTALLLOCATION folder in D drive using WIX?

后端 未结 1 1306
一向
一向 2021-01-21 04:30

Below xml creates the specified folders under C:\\Programfiles but I want to create (SomeFolder\\MyApp) Folders in D:\\MySetupFolder\\, how can I create this using the WIX?

相关标签:
1条回答
  • 2021-01-21 04:50

    Set the value of rootdrive to the drive you want

    <CustomAction Id='SetRootDrive' Property='ROOTDRIVE' Value='[%SystemDrive]\'/>
    

    System drive will be by default the default drive used by OS

    Added code to call 'SetRootDrive' action: You need to call it from InstallUISequence

    <InstallUISequence>
      <Show Dialog="MyWelcomeDlg" Before="CostFinalize">NOT Installed</Show>
      <!-- App search is what does FindInstallLocation, and it is dependent on FindRelatedProducts -->
      <AppSearch After="FindRelatedProducts"/>
      <Custom Action="SetRootDrive" Before="CostInitialize"></Custom>
    </InstallUISequence>
    
    0 讨论(0)
提交回复
热议问题