我有以下Wix XML代碼,這些代碼是我爲單包創作編寫的。問題是在用戶界面(WixUI_Advanced)中選擇了「安裝這臺機器的所有底板」模式時,UI中顯示的默認位置是「C:\ Users \ XXXX \ AppData \ Local \ Programs \ MyApp \「。 我怎樣才能改變這一狀況,使默認位置爲.. \程序文件(x86)\ MyApp的....WiX安裝程序:單包創作(每臺機器:不安裝在程序文件中)
如果我改變<Property Id="MSIINSTALLPERUSER" Value=" "/>,
則默認位置是.. \程序文件(x86) ..,但每個用戶由於缺乏管理員權限而無法工作。
非常感謝。
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"
xmlns:netfx="http://schemas.microsoft.com/wix/NetFxExtension"
xmlns:util="http://schemas.microsoft.com/wix/UtilExtension">
<!--Product Information-->
<Product Id="*"
Name="$(var.ApplicationName)"
Language="1033" Version="!(bind.FileVersion.$(var.ExecutableName))" Manufacturer="$(var.ManufacturerName)"
UpgradeCode="33bc2348-****-****-****-ebcde0d14afe">
<!--MSI Package Information-->
<Package InstallerVersion="500"
Compressed="yes" />
<!--Single Package Authoring-->
<Property Id="MSIINSTALLPERUSER" Value="1"/>
<Property Id="ALLUSERS" Value="2"/>
<!--Upgrade Information-->
<MajorUpgrade DowngradeErrorMessage="A newer version of $(var.ApplicationName) is already installed." />
<MediaTemplate EmbedCab="yes" />
<!--Application Features-->
<Feature Id="CoreFeature" Title="$(var.ApplicationName)" Level="1">
<ComponentGroupRef Id="ProductComponents" />
<ComponentRef Id="ApplicationShortcut" />
<ComponentRef Id="RegisterApplicationAutoStart" />
</Feature>
<!--Required .NET Framework for the Application-->
<PropertyRef Id="NETFRAMEWORK35" />
<Condition Message="This application requires Microsoft .NET Framework 3.5 or greater. Please install the .NET Framework then run this installer again.">
<![CDATA[Installed OR NETFRAMEWORK35]]>
</Condition>
<!--Advanced UI-->
<Property Id="ApplicationFolderName" Value="$(var.ApplicationName)" />
<Property Id="WixAppFolder" Value="WixPerMachineFolder" />
<UIRef Id="WixUI_Advanced"/>
<InstallExecuteSequence>
<Custom Action="LaunchApplication" After="InstallFinalize">NOT Installed</Custom>
</InstallExecuteSequence>
</Product>
<Fragment>
<!-- Define the Target Directory. The individual files will be filled in via a Heat generated fragment. -->
<Directory Id="TARGETDIR" Name="SourceDir">
<!--Define the directory when the application will be installed-->
<Directory Id="ProgramFilesFolder">
<Directory Id="APPLICATIONFOLDER" Name="$(var.ApplicationName)" />
</Directory>
</Fragment>
<Fragment>
<Component Id="RegisterApplicationAutoStart" Directory="ApplicationProgramsFolder" Guid="*">
<RegistryValue Root="HKMU"
Key="Software\Microsoft\Windows\CurrentVersion\Run"
Name="$(var.ApplicationName)"
Type="string"
Value="[APPLICATIONFOLDER]$(var.ExecutableName)"
KeyPath="yes" />
</Component>
</Fragment>
</Wix>
我的問題是,每機安裝不[ProgramFilesFolder] [ApplicationFolderName]發生,取而代之的則是發生在 –
感謝您的答覆。 我的問題是,每機安裝不[ProgramFilesFolder] [ApplicationFolderName]發生,而是正在發生的事情,在C:\用戶\ \應用程序數據\本地\程序。我無法弄清楚爲什麼這個默認的pah被改變了。 用戶可以更改此路徑,但如果他沒有,那麼它就會在上面安裝文件夾,它不適合其他標準用戶訪問。 –