Wix - Setting Install Folder correctly

前端 未结 2 699
抹茶落季
抹茶落季 2020-12-03 10:38

I\'m creating a program which is being installed by Wix, using VS 2010 and I\'ve already got the product.wxs ready.

In my wxs file, I\'ve got directory definitions w

2条回答
  •  醉话见心
    2020-12-03 11:12

    I'm not quite sure, but this is what I think has happened.

    When you author a SetDirectory element, you basically add a custom action which sets a directory to the MSI database. As long as you do not specify the sequence it is executed in, it defaults to both, which means execute in both InstallUISequence and InstallExecuteSequence.

    Now, when a user changes the installation directory in the wizard, this happens in the UI sequence. Obviously, when the installation enters the execute sequence, the value of INSTALLFOLDER is set to [WindowsVolume]Myapp as it was instructed.

    So, you have to rework this somehow. Keep in mind the silent installation as well - there's only execute sequence there.

    UPDATE instead of what you have, try something like this:

    
      
        
          
          
        
      
    
    

    And let the user optionally change the INSTALLFOLDER as you do now.

提交回复
热议问题