0

在我们的项目中,我们将删除注册表项以使非管理员用户能够安装它。

我们当前的代码如下,我试图从 XML 文件中注释掉该部分,但失败了。

有没有机会我们可以在没有注册表项的情况下创建快照?谢谢。

    <DirectoryRef Id="ApplicationProgramsFolder">
  <Component Id="ApplicationShortcut" Guid="C85221B1-70CA-455D-B322-093543BD4DF0">
    <Shortcut Id="ApplicationStartMenuShortcut"
              Name="$(var.ProductName)"
              Description="$(var.ProductDescription)"
              Target="[APPLICATIONROOTDIRECTORY]OMOffline.exe"
              WorkingDirectory="APPLICATIONROOTDIRECTORY" />
    <Shortcut Id="RemoteAssistance"
              Name="Request Remote Assistance"
              Description="Starts Remote Assistance and creates a password-protected RA ticket that is attached to a new Remote Assistance invitation. The User must enter the e-mail address of the Helper in the To field to send the message to the Helper."
              Target="[SystemFolder]MSRA.exe"
              Arguments="/email"/>
    <Shortcut Id="UninstallProduct"
              Name="Uninstall $(var.ProductName)"
              Target="[SystemFolder]msiexec.exe"
              Arguments="/x [ProductCode] SQLSERVER=&quot;[SQLSERVER]&quot;"
              Description="Uninstalls $(var.ProductName)"  />
    <RemoveFolder Id="RemoveApplicationProgramsFolder"
                  Directory="ApplicationProgramsFolder"
                  On="uninstall"/>
    <!--<RegistryValue Root="HKCU" Key="Software\$(var.ProductManufacturer)\$(var.ProductName)" Name="shortcutsinstalled" Type="integer" Value="1" KeyPath="yes"/>-->
  </Component>
</DirectoryRef>


<DirectoryRef Id="DesktopFolder">
  <Component Id="DesktopShortcut" Guid="C03900DF-FFD8-44B8-AA42-1BC72BB9E1F4">
    <Shortcut Id="ApplicationDesktopShortcut"
      Name="$(var.ProductName)"
      Description="$(var.ProductDescription)"
      Target="[APPLICATIONROOTDIRECTORY]OMOffline.exe"
      WorkingDirectory="APPLICATIONROOTDIRECTORY" />
    <!--<RegistryValue Root="HKCU" Key="Software\$(var.ProductManufacturer)\$(var.ProductName)" Name="desktopshortcutinstalled" Type="integer" Value="1" KeyPath="yes"/>-->
  </Component>
</DirectoryRef>
4

1 回答 1

0

HKCU 是按用户输入的,这不应该干扰您进行按用户安装的目标。您可以使用http://blogs.msdn.com/b/rflaming/archive/2006/09/30/778690.aspx为每个用户安装一个包。

为了回答您的问题,我尝试了没有注册表值的安装。Program Was allowed to build (with ICE38/ICE41 error), 我可以看到安装 MSI 后的链接

于 2013-06-05T13:39:20.817 回答