使用wix代码创建msi并将其安装在已安装的应用程序上

时间:2013-06-12 12:25:22

标签: wix wix3.7

我已经开发了一个wix代码来为我公司的应用程序创建一个msi。当我在系统上安装msi时,如果旧的版本说该应用程序的2.1.9115已存在,则它不会更新并安装新创建的msi.It正在单独安装,控制面板显示两个版本的应用程序。是产品的升级是我的问题的解决方案吗?。我的代码是

<?xml version='1.0' encoding='UTF-8'?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">


<Product Name='smart viewer' Id="*" Language='1033' Codepage='1252' Version='2.0.0'
Manufacturer='company' UpgradeCode='12345678-1234-1234-1234-111111111111'>

<Package Keywords='Installer,MSI' InstallerVersion='100' Languages='1033'
     Compressed='yes' SummaryCodepage='1252'/>
<Media Id="1" Cabinet="myapp.cab" EmbedCab="yes" />

<Directory Id="TARGETDIR" Name="SourceDir">
    <Directory Id="ProgramFilesFolder">
        <Directory Id="INSTALLDIR" Name="my file">
            <Directory Id="INSTALLFOLDER" Name="my folder">
            </Directory>
        </Directory>
    </Directory>
<Directory Id="ProgramMenuFolder">
    <Directory Id="ApplicationProgramsFolder" Name="ProgramsFolder"/>
    </Directory>
</Directory>

<DirectoryRef Id="INSTALLFOLDER">
<Directory Id="DesktopFolder" Name="Desktop"/>
<Component Id='MainExecutable' Guid='*'>
    <File Id='ExecutableFile' Name='my.exe' DiskId='1' Source='$(var.Sandbox)\Windows\release\my.exe' KeyPath='yes'>
        <Shortcut Advertise="yes" Id="MyProductDesktopShortcut" Directory="DesktopFolder"  Name="smart Viewer" WorkingDirectory="INSTALLFOLDER" Icon="Icon.exe"> <Icon Id="Icon.exe" SourceFile="$(var.Sandbox)\Installer-Win\Icon.ico"/>
        </Shortcut>
        <Shortcut Id="startmenu" Advertise="yes"  Directory="ApplicationProgramsFolder"   Name="smart Viewer"  WorkingDirectory="ProgramMenuFolder" Icon="Icon.exe"> <Icon Id="Icon1.exe" SourceFile="$(var.Sandbox)\Installer-Win\Icon.ico"/>  
        </Shortcut>
    </File>
<RemoveFolder Id="DeleteShortcutFolder" Directory="ApplicationProgramsFolder"
On="uninstall" />
</Component>

0 个答案:

没有答案