wixtoolset / issues

WiX Toolset Issues Tracker
http://wixtoolset.org/
129 stars 36 forks source link

WixStdBA: Options - Browse opens folder browser dialog in My Documents instead of predefined path (or its parent) #8138

Open dallmair opened 4 months ago

dallmair commented 4 months ago

WiX Version

5.0.0

.NET or MSBuild or Visual Studio Version

8.0.202

HeatWave Version

1.0.3.14

Windows Version

Win11 23H2 (22631.3447)

Repro Repo

No response

Repro Steps

  1. Create a new bundle
  2. Uncomment the element in and put some path to an MSI file into the Value attribute
  3. Add a default value for the InstallFolder variable. So in the element as a sibling of , put:
    <Variable Name="InstallFolder"
              Type="formatted"
              Value="[ProgramFiles6432Folder]MyShinyProduct"
              bal:Overridable="yes" />
  1. Build the executable.
  2. Run it.
  3. Click Options. See that the Install location text box has been populated with the variable value set in step 3.
  4. Click Browse.

Actual Result

Folder browser dialog opens up in My Documents folder.

Expected Result

Folder browser dialog opens up in [InstallFolder] folder (if it exists) or the most specific parent directory that exists.

Acknowledgements

pedro-w commented 4 months ago

I think I know how to do this, but, is it correct?

I can see a use where someone has filled up C:, added a second drive and wants to install new apps there. I had a laptop which came with a small SSD and a much larger HDD and it was a constant fight to get stuff onto the large drive. But in these cases I want a completely different path, not to tweak the suggested install path.

Also supposing I did browse to D:\ExtraProgs - I don't really want the installer to put everything there, I want it in D:\ExtraProgs\MyShinyProduct. There is an option in the dialog to create a subfolder (I think?) but is that going to cause problems for the installer database to put things in a folder it didn't create or own?

What do you think?

ps. it's not necessarily the My Documents folder but "the most recent location that the user saved to or opened from" as determined by Windows in some opaque and capricious way.