我想在办公室版本中选择,默认为32位。但是在安装并检查要复制文件的属性时,请选择默认值,而不考虑我的选择。如何解决?
Product.wxs
<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"
xmlns:util="http://schemas.microsoft.com/wix/UtilExtension"
>
<Product Id="{95B5E9E1-AB21-4947-A047-74C169B1D1F2}" Name="Xproduct" Language="1033" Version="1.0.0.0" Manufacturer="X Limited" UpgradeCode="af9969f2-fb9c-44c7-b207-e89f1d900a91">
<Package InstallerVersion="301" Compressed="yes" InstallPrivileges="elevated" InstallScope="perMachine" AdminImage="yes" Manufacturer="X Limited" />
<MajorUpgrade DowngradeErrorMessage="A newer version of [ProductName] is already installed." />
<MediaTemplate />
<Property Id="officeVersion" Value="32"/>
<UI Id="MyWebUI">
<UIRef Id="WixUI_FeatureTree" />
<UIRef Id="WixUI_ErrorProgressText" />
<DialogRef Id="CheckVersion"/>
<Publish Dialog="LicenseAgreementDlg" Control="Next"
Event="NewDialog" Value="CheckVersion"
Order="3">LicenseAccepted = "1"</Publish>
</UI>
<Feature Id="CommonFuture" Title="xInstaller" Level="1">
<ComponentGroupRef Id="ShotcutComponents"/>
<ComponentGroupRef Id="xComponents"/>
<ComponentGroupRef Id="PocketSoapComponent"/>
<ComponentGroupRef Id="SystemComponentsWinX86" />
<ComponentGroupRef Id="SystemComponentsWinX64"/>
<ComponentGroupRef Id="SystemComponentsWinX64Office64"/>
</Feature>
</Product>
<Fragment>
<Condition Message="You need to be an administrator to install this product.">
Privileged
</Condition>
</Fragment>
<Fragment>
<InstallExecuteSequence>
<Custom Action='MyProcess.TaskKill' Before='InstallValidate'>NOT Installed</Custom>
</InstallExecuteSequence>
<Property Id="System32WindowsFolder" Value="C:\Windows\System32"/>
<Property Id="QtExecCmdLine" Value='"[WindowsFolder]\System32\taskkill.exe" /F /IM EXCEL.EXE'/>
<CustomAction Id="MyProcess.TaskKill" BinaryKey="WixCA" DllEntry="CAQuietExec" Execute="immediate" Return="ignore"></CustomAction>
<Directory Id="TARGETDIR" Name="SourceDir">
<Directory Id="SystemFolder" />
<Directory Id="System32WindowsFolder"/>
<Directory Id="ProgramFilesFolder">
<Directory Id="INSTALLFOLDER" Name="xAddin"/>
</Directory>
<Directory Id="ProgramMenuFolder">
<Directory Id="xShorcutsDir" Name="xAddin"/>
</Directory>
<Directory Id="AppDataFolder">
<Directory Id="Microsoft" Name="Microsoft">
<Directory Id="AddIns" Name="AddIns"/>
</Directory>
</Directory>
</Directory>
</Fragment>
<Fragment>
<ComponentGroup Id="SystemComponentsWinX64" Directory="SystemFolder">
<Component Id="SystemDLL" Guid="{5CC58B1B-CF05-412B-A9DC-89C4D9DDA8E3}" >
<File Id="FILE_xXIDLL" Source="dll/system/xXlFunctions.dll" KeyPath="yes"/>
<Condition>officeVersion = 32 AND %PROCESSOR_ARCHITECTURE="AMD64"</Condition>
</Component>
</ComponentGroup>
</Fragment>
<Fragment>
<ComponentGroup Id="SystemComponentsWinX86" Directory="SystemFolder">
<Component Id="SystemDLLx86" Guid="{8F3B689F-EC06-43C9-AF87-47DB8534EC9D}" >
<File Id="FILE_xXIDLLx86" Source="dll/system/xXlFunctions.dll" KeyPath="yes"/>
<Condition>officeVersion = 32 AND %PROCESSOR_ARCHITECTURE="x86"</Condition>
</Component>
</ComponentGroup>
</Fragment>
<Fragment>
<ComponentGroup Id="SystemComponentsWinX64Office64" Directory="System32WindowsFolder">
<Component Id="SystemDLLx64" Guid="{569E68EB-9C6D-4B72-A811-429A6901B05A}" >
<File Id="FILE_xXIDLLx64" Source="dll/system/x64/xXlFunctions.dll" KeyPath="yes"/>
<Condition>officeVersion = 64 AND %PROCESSOR_ARCHITECTURE="AMD64"</Condition>
</Component>
</ComponentGroup>
</Fragment>
<Fragment>
<ComponentGroup Id="xComponents" Directory="AddIns">
<Component Id="xXLA" Guid="{BBDA689A-B48D-4B61-8A9F-50CB0B4BC9AA}" >
<File Id="FILE_xXLA" Source="xla/x.xla"/>
<RegistryValue Id="RegKeyxAddin" Root="HKCU"
Key="Software\Microsoft\Office\Excel\AddIns\aqillaaddin"
Name="xAddin"
Value="x Excel Add-In"
Type="string" KeyPath="yes" />
<RemoveFolder Id="RemoveAddInsFolder" On="uninstall" Directory="AddIns"/>
</Component>
</ComponentGroup>
</Fragment>
<Fragment>
<ComponentGroup Id="ShotcutComponents" Directory="xShorcutsDir">
<Component Id="UninstallShorcut" Guid="{BEECAC18-779F-4F6A-8D0B-2545626FD80A}">
<Shortcut Id="UninstallShorcut"
Name="Uninstall x Addin"
Description="Uninstall x Addin and all of its components"
Target="[System64Folder]msiexec.exe"
Arguments="/x [ProductCode]" />
<RemoveFolder Id="RemoveMyApplication" On="uninstall"/>
<RegistryValue Root="HKCU"
Key="Software\Microsoft\xAddin"
Name="installed"
Type="integer"
Value="1"
KeyPath="yes"/>
</Component>
</ComponentGroup>
</Fragment>
</Wix>
ChecKVersion.wxs
<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Fragment>
<UI>
<Dialog Id="CheckVersion" Width="370" Height="270" Title="[ProductName]" NoMinimize="yes" >
<!-- Virtual Dir prompt -->
<Control Id="Office32" Type="RadioButtonGroup" Property="officeVersion" Height="100" Width="200" X="50" Y="50">
<RadioButtonGroup Property="officeVersion">
<RadioButton Value="32" Text="Microsot Office Version 32bit" Height="17" Width="200" X="0" Y="0"/>
<RadioButton Value="64" Text="Microsot Office Version 64bit" Height="17" Width="200" X="0" Y="20"/>
</RadioButtonGroup>
</Control>
<!-- Back button -->
<Control Id="Back" Type="PushButton" X="180" Y="243"
Width="56" Height="17" Text="&Back">
<Publish Event="NewDialog" Value="LicenseAgreementDlg">1</Publish>
</Control>
<Control Id="Install" Type="PushButton" X="236" Y="243"
Width="56" Height="17" Default="yes" Text="&Install" ElevationShield="yes">
<Publish Event="EndDialog" Value="Return" Order="1">1</Publish>
</Control>
<Control Id="Cancel" Type="PushButton" X="304" Y="243"
Width="56" Height="17" Cancel="yes" Text="Cancel">
<Publish Event="SpawnDialog" Value="CancelDlg">1</Publish>
</Control>
<Control Id="BannerBitmap" Type="Bitmap" X="0" Y="0"
Width="370" Height="44" TabSkip="no" Text="WixUI_Bmp_Banner" />
<Control Id="Description" Type="Text" X="25" Y="23"
Width="280" Height="15" Transparent="yes" NoPrefix="yes">
<Text>Please select Microsoft Office Version</Text>
</Control>
<Control Id="BottomLine" Type="Line" X="0" Y="234"
Width="370" Height="0" />
<Control Id="Title" Type="Text" X="15" Y="6"
Width="200" Height="15" Transparent="yes" NoPrefix="yes">
<Text>{\WixUI_Font_Title}Microsoft Office select version</Text>
</Control>
<Control Id="BannerLine" Type="Line" X="0" Y="44" Width="370" Height="0" />
</Dialog>
</UI>
</Fragment>
</Wix>
当系统是64位时的另一个问题我无法将文件复制到C:\ Windows \ System32。系统会自动覆盖C:\ WINDOWS \ SysWOW64 \
中的文件夹答案 0 :(得分:0)
转变为公共财产,它被认为是
答案 1 :(得分:0)
使用属性“Secure”表示在使用提升的权限进行托管安装时,可以将属性传递到服务器端。
<Property Id="OFFICEVERSION" Secure="yes" Value="32"/>