-
Notifications
You must be signed in to change notification settings - Fork 176
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Empty directory is created in Program files if user changes install location #790
Comments
Just from the top of my head. This is what you might be looking for: AutoElements.SupportEmptyDirectories = CompilerSupportState.Disabled; |
It didn't help. As I understand, during building the directory 'myCompany' is not actually empty, it contains 'myProduct' directory. It becomes empty during installation, when user changes install directory to custom path |
It will need to wait til end of Christmas. But you can have a look at the generated WiX it may give you some clue. Merry Christmas! |
This is an interesting one. That unfortunately does not have a good solution. BTW you don't need to use This is what WixSharp does for a canonical install scenario var project = new Project("My Product",
new Dir(@"%ProgramFiles%\My Company\My Product",
. . . produces: <Directory Id="TARGETDIR" Name="SourceDir">
<Directory Id="ProgramFilesFolder" Name="ProgramFilesFolder">
<Directory Id="ProgramFilesFolder.My_Company" Name="My Company">
<Directory Id="INSTALLDIR" Name="My Product">
. . .
</Directory>
</Directory>
</Directory>
</Directory> Understandable if user select a custom destination (sets custom "INSTALLDIR") then Something like that is happening in your case when multiple subdirs are generated and WixSharp assigns If you want to avoid that you need to assign var project = new Project("My Product",
new Dir("%ProgramFiles%",
new InstallDir("My Company",
new Dir("My Product",
. . . produces: <Directory Id="TARGETDIR" Name="SourceDir">
<Directory Id="ProgramFilesFolder" Name="ProgramFilesFolder">
<Directory Id="INSTALLDIR" Name="My Company">
<Directory Id="INSTALLDIR.My_Product" Name="My Product">
. . .
</Directory>
</Directory>
</Directory>
</Directory>
|
It helps, but in that case in dialog where user chooses an install directory default folder would be |
But this is how MSI/WiX woks. You decide , which point you want to mark as INSTALLDIR and if it happens to have custom dir between programfiles and itself then this dir a what you are asking MSI to install regardless of the user installdir selection (your original situation). If you have extra custom dirs between your first deployment asset and INSTALLDIR then these dirs are part of your installations (your current situation). Thus if user decided to install on drive D the deployment will go to |
I have simple project setup like:
If user changes install location, everything is installed in chosen location, but also empty directory 'C:\Program Files (x86)\myCompany' is created.
Is there some way to prevent creating of this empty directory?
The text was updated successfully, but these errors were encountered: