2013-01-02 56 views
0

我是WIX新手。事实上,这是我的第一个项目。所以我有问题应该不会令人感到意外。wix不能更新可执行文件

我有我安装的所有设置和准备推出,但今天上午,我需要我的服务做了更改,所以我作出改变和编译。我构建WIX项目并安装它。我开始提供服务并运行它,但旧代码已执行。事实证明,我的服务的旧版本仍然安装。这是否意味着新版本的服务没有打包,或者是否有某种我缺少的升级规则?出于某种原因,PDB文件得到更新,但不是EXE。

下面是我的WXS文件。请亲切...

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

<?define AppName="My Service"?> 
<?define MfgName="My Company"?> 
<?define SourcePath="..\My Service\bin\$(var.Configuration)"?> 

<Product Name="$(var.AppName)" Language="1033" Version="1.0.0.0" Manufacturer="$(var.MfgName)" 
     Id="*" UpgradeCode="063de86b-f12b-4af1-91ff-ce0917fffd5c" Codepage="1252"> 

<Package Id="*" Keywords="Installer" Description="$(var.AppName) Installer" 
     Manufacturer="$(var.MfgName)" Comments="My Service blah blah blah" 
     InstallerVersion="200" Compressed="yes" InstallScope="perMachine" SummaryCodepage="1252" /> 

<!-- 
    <MajorUpgrade DowngradeErrorMessage="A newer version of [ProductName] is already installed." /> 
    <MediaTemplate /> 
--> 

<Media Id="1" Cabinet="setup.cab" EmbedCab="yes" DiskPrompt="CD-ROM #1"/> 
<Property Id="DiskPrompt" Value="$(var.AppName) Installer [1]"/> 

<Directory Id="TARGETDIR" Name="SourceDir"> 
     <Directory Id="ProgramFilesFolder" Name="PFiles"> 
    <Directory Id="CompanyFolder" Name="$(var.MfgName)"> 
       <Directory Id="INSTALLFOLDER" Name="$(var.AppName)"> 
     <Component Id="ServiceFile" Guid="3688d9ee-08ed-4dde-87d8-3b7a752a99bf"> 
      <File Id="ServiceEXE" Name="My Service.exe" DiskId="1" Source="$(var.SourcePath)\My Service.exe" KeyPath="yes" Vital="yes" /> 
      <File Id="ServicePDB" Name="My Service.pdb" DiskId="1" Source="$(var.SourcePath)\MY Service.pdb" KeyPath="no" Vital="yes"/> 
      <File Id="LibraryDLL" Name="library.dll" DiskId="1" Source="$(var.SourcePath)\library.dll" KeyPath="no" Vital="yes"/> 
      <File Id="LibraryPDB" Name="library.pdb" DiskId="1" Source="$(var.SourcePath)\library.pdb" KeyPath="no" Vital="yes"/> 
      <File Id="Config" Name="My Service.exe.config" DiskId="1" Source="$(var.SourcePath)\My Service.exe.config" KeyPath="no" Vital="yes"/> 

      <ServiceInstall Id="InstallService" Name="MyService" Type="ownProcess" ErrorControl="normal" Start="auto" 
          DisplayName="$(var.AppName)" Description="My Service blah blah blah"> 
      <ServiceConfig OnInstall="yes" DelayedAutoStart="yes" /> 
      </ServiceInstall> 
      <ServiceControl Id="ControlService" Name="MyService" Remove="both" Stop="both" Wait="no"/> 
     </Component> 
     </Directory> 
    </Directory> 
     </Directory> 
    </Directory> 

<Feature Id="MainFeature" Title="$(var.AppName) Setup" Level="1"> 
    <ComponentRef Id="ServiceFile"/> 
    </Feature> 
</Product> 
</Wix> 

回答

1

如果安装成功但文件没有更新,您应该记录安装以查看原因。例如:

的文件没有更新的原因
msiexec /i filename.msi /lvoicewarmupx log.txt 

之一是,如果Windows安装程序将检查现有文件的版本,它比您要安装该文件的版本更新。