how to fix warning ICE39: Admin Image flag set in

2019-08-01 01:26发布

问题:

I am creating an installer using Wix in visual studios 2012. Below is my code for the product.wxs. I am receiving a "warning ICE39: 'Admin Image' flag set in SummaryInfo stream. Should be set only for Admin packages." I have changed admin image from yes to no and rebuilt, it removes the warning but i am still unable to install on a computer that has local admin privileges, and is also a domain admin. However, i can install it on my machine, and im not a domain admin,

I would upload the image but not enough rep yet. here is an image link.

http://i656.photobucket.com/albums/uu290/chrizbahr/warning_zps12f388b2.png

<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">


<?define ProductName="CHC Pedometer Sync"?>
  <?define ProductVersion="1.0.0"?>
  <?define ProductGUID="{6D234D2C-5F74-42A8-A9DA-14D684B2EAFC}"?>
  <?define ProductUpgradeCode="{DDDD43E0-DB34-4AD6-BF54-F6B12509E84F}"?>
  <?define Manufacturer="CHC Wellness"?>
  <Product Id="$(var.ProductGUID)"
           Name="$(var.ProductName)"
           Language="1033"
           Version="$(var.ProductVersion)"
           Manufacturer="$(var.Manufacturer)"
           UpgradeCode="$(var.ProductUpgradeCode)">
    <Package Id="*"
             Description="CHC Pedometer Sync Installer"
             Keywords="Installer"
             Manufacturer="$(var.Manufacturer)"
             SummaryCodepage="1252"
             InstallerVersion="200"
             Compressed="yes"
             InstallScope="perMachine"
             AdminImage="yes"
             InstallPrivileges="limited" />
    <MajorUpgrade DowngradeErrorMessage="A newer version of [ProductName] is already installed." />
    <MediaTemplate EmbedCab="yes"/>
    <!--DIRECTORY STRUCTURE-->
    <Directory Id="TARGETDIR" Name="SourceDir">
      <!--PROGRAM FILES-->
      <Directory Id="ProgramFilesFolder" Name="PFiles">
        <Directory Id="CHCWellness" Name="CHC Wellness">
          <Directory Id="INSTALLDIR" Name="$(var.ProductName)" />
        </Directory>
      </Directory>
      <!--DESKTOP-->
      <Directory Id="DesktopFolder" Name="Desktop"/>
      <!--START MENU-->
      <Directory Id="ProgramMenuFolder" Name="Programs">
        <Directory Id="ProgramMenuDir" Name="$(var.Manufacturer)" />
      </Directory>
    </Directory>
    <DirectoryRef Id="INSTALLDIR">
      <Component Id="MainExecutable" Guid="{FB74004F-F250-4B3C-B38C-D96D5657A27A}">
        <File Id="File_MainExecutable" Source="..\PedometerSync\bin\Release\PedometerSync.exe" Vital="yes" DiskId="1" KeyPath="yes">
          <Shortcut Id="MainExeShortcutDesktop"
                  Name="$(var.ProductName)"
                  Directory="DesktopFolder"
                  Description="$(var.ProductName)"
                  WorkingDirectory="INSTALLDIR"
                  Advertise="yes"
                  Icon="icon.ico" />
        </File>
      </Component>
      <Component Id="InterfaceExe" Guid="{68C78DE2-BEBB-41D7-B9F6-313BCFC88F68}">
        <File Id="PedometerInterfaceEXE" Source="..\PedometerSync\bin\Release\PedometerInterface.exe" Vital="yes" DiskId="1" KeyPath="yes" />
      </Component>
      <Component Id="EXEConfig" Guid="{8D9F2744-C1E4-45E1-88E7-C3427200767E}">
        <File Id="File_ExeConfigFile" Source="..\PedometerSync\bin\Release\PedometerSync.exe.config" Vital="yes" DiskId="1" KeyPath="yes" />
      </Component>
      <Component Id="Newtonsoft" Guid="{09343B58-A247-4AA9-9A32-A6CB1BD9CC2F}">
        <File Id="file_newtonsoft.json.dll" Source="..\PedometerSync\bin\Release\Newtonsoft.Json.dll" Vital="yes" DiskId="1" KeyPath="yes" />
      </Component>
    </DirectoryRef>
    <!--SHORTCUTS-->
    <DirectoryRef Id="ProgramMenuDir">
      <Component Id="StartMenuShortcut" Guid="{E02282A4-0907-4EC6-A5B7-623E50B4E642}">
        <Shortcut Id="MainExeShortcut"
                  Name="$(var.ProductName)"
                  Description="$(var.ProductName)"
                  Target="[INSTALLDIR]PedometerSync.exe"
                  Icon="icon.ico"/>
        <RemoveFolder Id="RemoveStartMenuShortcutDir" On="uninstall"/>
        <RegistryValue Root="HKCU" Key="Software\$(var.Manufacturer)\$(var.ProductName)" Name="installed" Type="integer" Value="1" KeyPath="yes" />
      </Component>
    </DirectoryRef>
    <!--FEATURES LIST-->
    <Feature Id="Standard" Level="1">
      <ComponentRef Id="MainExecutable"/>
      <ComponentRef Id="InterfaceExe"/>
      <ComponentRef Id="EXEConfig"/>
      <ComponentRef Id="Newtonsoft"/>
      <ComponentRef Id="StartMenuShortcut"/>
    </Feature>
    <!--ADD UI ELEMENTS-->
    <Property Id="WIXUI_INSTALLDIR" Value="INSTALLDIR" />
    <UIRef Id="WixUI_InstallDirCustom" />
    <UIRef Id="WixUI_ErrorProgressText" />
    <!--CUSTOM IMAGES-->
    <WixVariable Id="WixUIBannerBmp" Value="banner.bmp" />
    <WixVariable Id="WixUIDialogBmp" Value="dialog.bmp" />
    <!--ICONS-->
    <Icon Id="icon.ico" SourceFile="icon.ico" />
  </Product>
</Wix>

回答1:

Remove the Admin attribute. This attribute doesn't refer to needing admin rights to install a package, it refers to whether the MSI is a normal Installation or an Administrative Installation.

For more information, see the help topics:

Administrative Installation (Windows)

Word Count Summary property (Windows) (Notice the definition of bit 2 and bit 3 these correlate to the AdminImage and InstallPrivileges attributes respectively)