Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/wix/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Wix 使用Windows Server 2012时,产品升级时未从“开始”菜单中删除旧的快捷方式_Wix_Windows Installer_Windows Server 2012 - Fatal编程技术网

Wix 使用Windows Server 2012时,产品升级时未从“开始”菜单中删除旧的快捷方式

Wix 使用Windows Server 2012时,产品升级时未从“开始”菜单中删除旧的快捷方式,wix,windows-installer,windows-server-2012,Wix,Windows Installer,Windows Server 2012,当我们的产品在Windows Server 2012计算机上升级时,旧的快捷方式会留在“开始”菜单中。可执行文件将从系统中删除,但旧的快捷方式仍保留,用户单击该快捷方式时会导致错误,因为它不再在系统中 这不会发生在Windows2008R2上,我也不认为我们的msi是如何构建的。我在这里问这个问题是想看看其他人是否也经历过同样的问题 如果有帮助,我们正在使用WiX构建msi,下面是代码片段: <DirectoryRef Id="The_ShortCut"> <Compone

当我们的产品在Windows Server 2012计算机上升级时,旧的快捷方式会留在“开始”菜单中。可执行文件将从系统中删除,但旧的快捷方式仍保留,用户单击该快捷方式时会导致错误,因为它不再在系统中

这不会发生在Windows2008R2上,我也不认为我们的msi是如何构建的。我在这里问这个问题是想看看其他人是否也经历过同样的问题

如果有帮助,我们正在使用WiX构建msi,下面是代码片段:

<DirectoryRef Id="The_ShortCut">
  <Component Id="The_ShortCut" Guid="{our-guid}">
    <Shortcut Id="TheShortCut.exe"
                                Name="Config Wizard"
                                Description="$(var.ProductNameLong)"
                                Target="[ShortCutFolder]OurCompany.Product.TheShortCut.exe"
                                WorkingDirectory="ShortCutFolder"
              Icon="TheShortcutIcon.Ico">
      <Icon Id="TheShortcutIcon.Ico" SourceFile="oursourcepath"/>
    </Shortcut>
    <RegistryValue Root="HKCU" Key="Software\OurCompany\OurProduct" Name="installed" Type="integer" Value="1" KeyPath="yes"/>
    <RemoveFolder Id="Remove_Product" Directory="OurCompany"  On="uninstall"/>
    <RemoveFolder Id="Remove_Product_ShortCut" Directory="OurProduct_ShortCut" On="uninstall"/>
  </Component>
</DirectoryRef>

我从一位同事那里得到了这个令人满意的答案:

这看起来不像是您的包本身的问题。锁定的项目只是对*.lnk文件的引用,该文件位于您第一次锁定它时的位置。如果在升级后右键单击损坏的磁贴并转到“文件位置”,则会显示旧的快捷方式文件夹(由于文件夹路径已更改,该文件夹已不存在)

这一切似乎都是意料之中的行为。从这一点来看,我也不确定是否有办法以编程方式更新固定项


干杯

看到这个问题只发生在2012年,而不是2k8,我想说这不是你的WiX代码或你的MSI。。。我想知道
Directory=“OurProduct\u ShortCut”
的值是如何获得的?可能与产品目录的制作方式有关。。。或者在2012年被保留在另一个地方?@AltF4\u。我不清楚你想通过你的评论告诉我什么,请你重新措辞好吗?我不确定你的问题是不是修辞性的。如果不是,那我就不知道该怎么回答了。事实上,我认为问题不在于软件包,而在于它背后的代码。您如何获得“我们的产品”的价值?是硬编码的吗?或者它是否附加了类似于“%System%”的内容?