【问题标题】:ICE91 Wix in perMachine InstallerperMachine 安装程序中的 ICE91 Wix
【发布时间】:2017-05-03 19:12:07
【问题描述】:

我正在尝试制作一个 perMachine 安装程序,它能够在每个用户的 PersonalFolder 和 LocalAppDataFolder 中创建文件和文件夹。我总是收到如下所示的警告消息“警告 LGHT1076: ICE91: ...”。当我以管理员身份安装时,尽管有警告,但仍会创建文件和文件夹,但是当我以标准用户身份尝试安装程序时,不会在用户配置文件上创建文件和文件夹。有什么解决办法?


    <Directory Id="TARGETDIR" Name="SourceDir">
        <Directory Id="ProgramFilesFolder">
            <Directory Id="PFInstallDir" Name="Example">
                <Component Id="ApplicationFiles" Guid="12345678-1234-1234-1234-222222222222">
                    <File Id="ApplicationFile1" Source="notepad.exe"/>
                </Component>
            </Directory>
        </Directory>

        <Directory Id="CommonFilesFolder">
            <Directory Id="CFInstallDir" Name="Example">
                <Component Id="CommonApplicationFiles" Guid="12345678-1234-1234-1234-222222222223">
                    <File Id="ApplicationFile2" Source="notepad.exe"/>
                </Component>
            </Directory>
        </Directory>

        <Directory Id="CommonAppDataFolder">
            <Directory Id="CAInstallDir" Name="Example">
                <Component Id="CommonAppDataApplicationFiles" Guid="12345678-1234-1234-1234-222222222224">
                    <File Id="ApplicationFile3" Source="notepad.exe"/>
                </Component>
            </Directory>
        </Directory>

        <Directory Id="PersonalFolder">
            <Directory Id="InstallDirPersonal" Name="ExampleDocs">
                <Component Id="ApplicationPersonalFiles" Guid="12345678-1234-1234-1234-222222222225">
                    <CreateFolder />
                    <RemoveFolder Id="RemoveMyExampleDir1" On="uninstall" Directory="InstallDirPersonal"/>
                    <RegistryKey Root="HKCU" Key="Software\MyCompany\Documents">
                        <RegistryValue Name="MainExe" Value="1" KeyPath="yes" Type="integer" />
                    </RegistryKey>
                    <File Id="Notepad.MyExe"
                        Source="notepad.exe" DiskId="1" Checksum="yes">
                    </File>
                </Component>
            </Directory>
        </Directory>            

        <Directory Id="LocalAppDataFolder" Name="AppData">
            <Directory Id="InstallDirAppDataPersonal" Name="ExampleLocals">
                <Component Id="ApplicationPersonalDataFiles" Guid="12345678-1234-1234-1234-222222222226">
                    <CreateFolder />
                    <RemoveFolder Id="RemoveMyExampleDir" On="uninstall" Directory="InstallDirAppDataPersonal"/>
                    <RegistryKey Root="HKCU" Key="Software\MyCompany\Example">
                        <RegistryValue Name="MainExe" Value="1" KeyPath="yes" Type="integer" />
                    </RegistryKey>
                    <File Id="Notepad.MyExe1"
                        Source="notepad.exe" DiskId="1" Checksum="yes">
                    </File>
                </Component>
            </Directory>
        </Directory>
    </Directory>

    <Feature Id="DefaultFeature" Level="1">
        <ComponentRef Id="ApplicationFiles"/>
        <ComponentRef Id="CommonApplicationFiles"/>
        <ComponentRef Id="CommonAppDataApplicationFiles"/>
        <ComponentRef Id="ApplicationPersonalDataFiles"/>
        <ComponentRef Id="ApplicationPersonalFiles"/>
    </Feature>

</Product>

-- 构建开始:项目:SetupProjectPerUsrMachine,配置:Debug x86 --

警告 LGHT1076:ICE91:文件“Notepad.MyExe”将安装到每个用户目录“InstallDirPersonal”,该目录不会因 ALLUSERS 值而异。即使需要按机器安装,此文件也不会复制到每个用户的配置文件中。

警告 LGHT1076:ICE91:文件“Notepad.MyExe1”将安装到每个用户目录“InstallDirAppDataPersonal”,该目录不会因 ALLUSERS 值而异。即使需要按机器安装,此文件也不会复制到每个用户的配置文件中。

【问题讨论】:

    标签: windows wix installation


    【解决方案1】:

    问题解决了! http://www.installworld.com/index.php?option=com_content&do_pdf=1&id=146

    “如果必须将资源复制到每个用户的配置文件中,则向您的程序包添加功能来执行此操作。要实现此目的,请添加当前用户注册表项(即,只是一个虚拟注册表项)并将此注册表项设置为包含资源的组件的关键路径。这意味着作为 MSI 自我修复机制的一部分,资源将被复制到下一个用户的配置文件,前提是产品存在广告的入口点。"

    http://blog.bittercoder.com/2007/02/28/wix-shortcuts/

    <Component Id="StandAloneApplication" Guid="C8D5DB05-2D68-40e8-88D1-EF5BEA18DBE1">
      <File Id="SomeCompanySomeProductHostApp" 
            Name="SomeCompany.SomeProduct.HostApp.exe" 
            DiskId="1" 
            Source="....buildSomeCompany.SomeProduct.HostApp.exe" 
            Vital="yes">
    
        <Shortcut Advertise="yes" 
                  Id="SomeCompanySomeProductHostAppShortcut" 
                  Directory="ProgramMenuDir" 
                  Name="My Product" 
                  WorkingDirectory="INSTALLDIR" 
                  Description="SomeProduct Application" 
                  Icon="HostAppShortcutIcon.exe">
    
          <Icon Id="HostAppShortcutIcon.exe" 
                SourceFile="....buildSomeCompany.SomeProduct.HostApp.exe" />
    
        </Shortcut>
      </File>
    </Component>
    

    【讨论】:

      猜你喜欢
      • 2013-09-09
      • 1970-01-01
      • 2023-04-10
      • 2017-03-06
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-12-31
      • 1970-01-01
      相关资源
      最近更新 更多