I've been banging my head against this one for a while and I've finally caved (after a lot of searching) and have come to stack overflow for help.
As the title suggests I am trying to create an installer that can carry out a per-user install without requiring any elevated permissions.
However the following code generates a lot of ICE38 and ICE64 errors, as well as ICE91 warnings at compile time.
<Directory Id="TARGETDIR" Name="SourceDir">
<Directory Id="AppDataFolder">
<Directory Id="AppRootDirectory" Name="[Manufacturer]">
<Directory Id="INSTALLFOLDER" Name="[ProductName]" />
</Directory>
</Directory>
</Directory>
<Feature Id="ProductFeature" Title="ATestProject" Level="1">
<ComponentGroupRef Id="modules" />
</Feature>
"modules" refers to the contents of a heat.exe generated .wxs file whose components install directory is "INSTALLFOLDER"
The solutions available on the internet indicate a lot of editing of my modules.wxs file in order to get this to work, this is not acceptable - There are well over 1000 files in this release process and anything that cannot be automated (done on the command line at build time or with a script) is entirely out of the question.
Thanks in advance!
You can set up a per-user install that, by default on windows 7 and later, installs to %localappdata%\Programs by doing the following;
<Property Id="ALLUSERS" Secure="yes" Value="2"/>
<Property Id="MSIINSTALLPERUSER" Secure="yes" Value="1" />
<Directory Id="TARGETDIR" Name="SourceDir">
<Directory Id="ProgramFilesFolder">
<Directory Id="AppRootDirectory" Name="Manufacturer">
<Directory Id="INSTALLFOLDER" Name="ProductName" />
</Directory>
</Directory>
</Directory>
<!-- ... -->
<!-- ... -->
<Feature Id="ProductFeature" Title="ATestProject" Level="0">
<ComponentGroupRef Id="modules" />
</Feature>
Basically Setting the two properties at the top configures the installer to a "per user" install, which is UAC friendly and does not need elevated permissions. See This for a detailed explanation.
Please also note that ProgramFilesFolder becomes %localAppData%/programs - Microsoft's default storage place for per-user applications and installing to a users profile rather than C:\Program Files (x86)\
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With