[wix-users] WixUI_Advanced -- "WixPerMachineFolder is not a valid default value"
Alan Sinclair
anadem at gmail.com
Mon Oct 30 22:38:59 PDT 2017
I want to make a dual-mode MSI which defaults to per-machine but allows the
user to choose per-user, so I'm trying to use WixUI_Advanced with
SampleWixUI.wxs, aiming to discover whether {default per-machine with
optional per-user} is actually possible.
The WixUI_Advanced tutorial page (
http://wixtoolset.org/documentation/manual/v3/wixui/dialog_reference/wixui_advanced.html)
says that some properties must be added, including
<Property Id="WixAppFolder" Value="*WixPerMachineFolder*" />
But with Light is saying:
SampleWixUI.wxs(19) : error LGHT0204 : ICE34: *WixPerMachineFolder *is not
a valid default value for the RadioButtonGroup using property WixAppFolder.
The value must be listed as an option in the RadioButtonGroup table.
(Same error for pretty much any value, including "WixPerUserFolder" or
"Rubbish" .. and omitting WixAppFolder just gets LGHT0094 error "Unresolved
reference .. WixAppFolder").
How can I resolve that?
My wix3 source for InstallScopeDlg.wxs shows:
<Control Id="BothScopes" Type="RadioButtonGroup" X="20" Y="55" Width="330"
Height="120" Property="WixAppFolder" Hidden="yes">
<RadioButtonGroup Property="WixAppFolder">
<RadioButton Value="WixPerUserFolder" X="0" Y="0" Width="295"
Height="16" Text="!(loc.InstallScopeDlgPerUser)" />
<RadioButton Value="WixPerMachineFolder" X="0" Y="60" Width="295"
Height="16" Text="!(loc.InstallScopeDlgPerMachine)" />
</RadioButtonGroup>
<Condition Action="show">Privileged AND (!(wix.WixUISupportPerUser) AND
!(wix.WixUISupportPerMachine))</Condition>
</Control>
so I'm wondering if the error is spurious (but how to get past it??)
Thanks for any clues, hints, or answers!
Alan
Here's the offending code from the tutorial:
<?xml version='1.0' encoding='windows-1252'?>
<Wix xmlns='http://schemas.microsoft.com/wix/2006/wi'>
<Product Name='Foobar 1.0' Id='6D93B908-C04F-40CE-AEFD-93BDE6734498'
UpgradeCode='098E8F0E-574B-45C3-8D9A-B2EFE337450C'
Language='1033' Codepage='1252' Version='1.0.0' Manufacturer='Acme
Ltd.'>
<Package Id='*' Keywords='Installer'
Description="Acme's Foobar 1.0 Installer"
Comments='Foobar is a registered trademark of Acme Ltd.'
Manufacturer='Acme Ltd.'
InstallerVersion='100' Languages='1033' Compressed='yes'
SummaryCodepage='1252' />
<Media Id='1' Cabinet='Sample.cab' EmbedCab='yes' DiskPrompt="CD-ROM
#1" />
<Property Id='DiskPrompt' Value="Acme's Foobar 1.0 Installation [1]" />
<Directory Id='TARGETDIR' Name='SourceDir'>
<Directory Id='ProgramFilesFolder' Name='PFiles'>
<!-- <Directory Id='Acme' Name='Acme'> -->
<Directory Id="APPLICATIONFOLDER" Name="My Application Folder">
<Directory Id='INSTALLDIR' Name='Foobar 1.0'>
<Component Id='MainExecutable'
Guid='435F2FAA-BA9A-4635-8B18-E1A93A8C8B81'>
<File Id='FoobarEXE' Name='FoobarAppl10.exe' DiskId='1'
Source='FoobarAppl10.exe' KeyPath='yes'>
<Shortcut Id="startmenuFoobar10" Directory="ProgramMenuDir"
Name="Foobar 1.0" WorkingDirectory='INSTALLDIR' Icon="Foobar10.exe"
IconIndex="0" Advertise="yes" />
<Shortcut Id="desktopFoobar10" Directory="DesktopFolder"
Name="Foobar 1.0" WorkingDirectory='INSTALLDIR' Icon="Foobar10.exe"
IconIndex="0" Advertise="yes" />
</File>
</Component>
<Component Id='HelperLibrary'
Guid='44F86A92-20BC-48C7-BCA8-6D0FF288FE82'>
<File Id='HelperDLL' Name='Helper.dll' DiskId='1'
Source='Helper.dll' KeyPath='yes' />
</Component>
<Component Id='Manual'
Guid='75C59EE2-317E-4578-A303-4DBAFC59A848'>
<File Id='Manual' Name='Manual.pdf' DiskId='1'
Source='Manual.pdf' KeyPath='yes'>
<Shortcut Id="startmenuManual" Directory="ProgramMenuDir"
Name="Instruction Manual" Advertise="yes" />
</File>
</Component>
</Directory>
</Directory>
</Directory>
<Directory Id="ProgramMenuFolder" Name="Programs">
<Directory Id="ProgramMenuDir" Name="Foobar 1.0">
<Component Id="ProgramMenuDir"
Guid="3997394A-AD8B-4C08-BAB1-5671F1E9A347">
<RemoveFolder Id='ProgramMenuDir' On='uninstall' />
<RegistryValue Root='HKCU'
Key='Software\[Manufacturer]\[ProductName]' Type='string' Value=''
KeyPath='yes' />
</Component>
</Directory>
</Directory>
<Directory Id="DesktopFolder" Name="Desktop" />
</Directory>
<Feature Id='Complete' Title='Foobar 1.0' Description='The complete
package.'
Display='expand' Level='1' ConfigurableDirectory='INSTALLDIR'>
<Feature Id='MainProgram' Title='Program' Description='The main
executable.' Level='1'>
<ComponentRef Id='MainExecutable' />
<ComponentRef Id='HelperLibrary' />
<ComponentRef Id='ProgramMenuDir' />
</Feature>
<Feature Id='Documentation' Title='Description' Description='The
instruction manual.' Level='1000'>
<ComponentRef Id='Manual' />
</Feature>
</Feature>
<!--
http://wixtoolset.org/documentation/manual/v3/wixui/dialog_reference/wixui_advanced.html
-->
<UIRef Id="WixUI_Advanced" />
<Property Id="ApplicationFolderName" Value="My Application Folder" />
<Property Id="WixAppFolder" Value="WixPerMachineFolder " /> <!--
or WixPerUserFolder -->
<Icon Id="Foobar10.exe" SourceFile="FoobarAppl10.exe" />
</Product>
</Wix>
More information about the wix-users
mailing list