I am looking to specify a custom default directory for a wix toolset generated msi, reason being the program/install doesn't require admin rights for anything except copying program files to the program files directory, and I am considering allowing installation to the roam-able directory.
Asked
Active
Viewed 2,082 times
2
-
are you asking for a directory that matches your description or are you asking for general wix code? – mcy Mar 08 '14 at 21:19
-
I think I am looking for how to specify the default directory displayed in the WixUI_InstallDir dialog, probably defined similar to PhilDW's answer's code – stackuser83 Mar 08 '14 at 21:29
2 Answers
2
In general you specify a directory tree that includes your components/files. Something like this:
<Directory Id="TARGETDIR" Name="SourceDir">
<Directory Id="ProgramFilesFolder">
<Directory Id="INSTALLDIR" Name="MyExample">
<Component Id="ApplicationFiles" Guid="12345678-1234-1234-1234-222222222222">
will put whatever components etc you have into Programfiles\MyExample.
Is that what you're trying to do? You start with one of the standard installer properties, such as roaming AppDataFolder if that's where you want it:
http://msdn.microsoft.com/en-us/library/aa367565(v=vs.85).aspx

PhilDW
- 20,260
- 1
- 18
- 28
-
Would you recommend installing to a roaming directory? Way too many complications if you ask me. – Stein Åsmul Mar 08 '14 at 22:09
-
I'm not recommending that, but the OP said he was considering the roamable directory. That mean the roaming data folder, as I asked, and gave an example, that's all. I see no recommendation, just an answer. – PhilDW Mar 09 '14 at 17:52
-
Yes, so I complement your answer with my recommendation to not install to the roaming profile :-). But seriously - if it is just binaries it is fine, but for user data I would avoid it. User data never roams properly in my experience, and should be on a separate data share instead where proper backup is implemented. Opinion based, but from real world experience. – Stein Åsmul Mar 09 '14 at 18:28
0
the WIXUI_INSTALLDIR
is basically what I was looking for, once I figured what I was looking for:
https://stackoverflow.com/a/3302238/832705
For reference, the Wix v3 install target directory input dialog (wix documentation link) that uses the WIXUI_INSTALLDIR
default directory xml structure.

Community
- 1
- 1

stackuser83
- 2,012
- 1
- 24
- 41
-
Can we ask why you want to install the files roaming? Are they binaries? Data files? – Stein Åsmul Mar 08 '14 at 22:33
-
small program binaries and don't involve much internetworking at all, done so the user can use the program at different/new machine session logins – stackuser83 Mar 08 '14 at 22:41