How to correctly use WixAppFolder for install without UAC?
I have created a minimal installer with "WixAppFolder" set to "WixPerUserFolder". Application installs in HOME\AppData\Local\Apps\APP开发者_运维问答NAME as expected, but installer shows same UAC prompt for both per-user and per-machine install (under normal user this prompt has 'enter administrator password'). I'm using Windows 7 Ultimate 64-bit. The installer GUI for "Install just for you" says thet "you do not need local administrator privileges'. But it is not true - local administrator priviliges are required. What i'm doing wrong? Installer source code:
<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Product Id="*" Name="Test" Language="1033" Version="1.0.0"
Manufacturer="Me"
UpgradeCode="bb39686c-d77a-4bc4-bbd8-f13b1e0ec26c">
<Package InstallerVersion="200" Compressed="yes" />
<Media Id="1" Cabinet="media1.cab" EmbedCab="yes" />
<UIRef Id="WixUI_Advanced" />
<Property Id="ApplicationFolderName" Value="test_app" />
<Property Id="WixAppFolder" Value="WixPerUserFolder" />
<Directory Id="TARGETDIR" Name="SourceDir">
<Directory Id="ProgramFilesFolder">
<Directory Id="APPLICATIONFOLDER" Name="test_app">
<Component Id="c_test" Guid='*'>
<File Id='test_txt' Name="test.txt" />
</Component>
</Directory>
</Directory>
</Directory>
<Feature Id='f_test' Title="Test" Level='1' >
<ComponentRef Id='c_test' />
</Feature>
</Product>
</Wix>
First, set your Package/@InstallScope="perUser". Then you'll not want to default your application folder to ProgramFilesFolder because that is a per-machine location (pick a per-user location like LocalAppDataFolder). After that, it seems like things should work.
After long conversations with Wix team i found following:
- Until windows 7 it is not possible for windows installer to have a single installation that can install both per user or per machine.
- The UI text is a bug.
精彩评论