2012-05-15 42 views
0

当我安装.msi文件,我得到生成开始菜单和桌面上的快捷方式,但是当我卸载桌面快捷方式被删除,但开始菜单。我的代码是波纹管。请帮我解决我的问题。我已经花了差不多1天时间。为什么卸载后未删除“开始”菜单快捷方式?

<Directory Id="ProgramMenuFolder"> 
    <Directory Id="ProgramMenuSubfolder" Name="Kiosk"> 
     <Component Id="ApplicationShortcuts" Guid="12345678-1234-1234-1234-333333333333"> 
     <Shortcut Id="ApplicationShortcut1" Name="Kiosk" Description="Solusoft Product" Target="[INSTALLDIR]AMP\1.0.0.0\mpkiosk.exe" WorkingDirectory="INSTALLDIR"/> 
     <RegistryValue Root="HKCU" Key="Software\Kiosk" Name="installed" Type="integer" Value="1" KeyPath="yes"/> 
     <RemoveFolder Id="ApplicationShortcut1" On="uninstall"/> 
     </Component> 
    </Directory> 
</Directory> 

回答

0

下面是我在我的项目中使用的代码。希望,它会有所帮助。我想你可以使用'RemoveFile'而不是'RemoveFolder'并且不要忘记把'Name'属性里面。

  <RegistryKey Action="createAndRemoveOnUninstall" Root="HKCU" 
         Key="Software\$(var.ManufacturerEng)\$(var.ProductName)\$(var.ApplicationName)"> 
       <RegistryValue Name="ShortcutService" 
           Type="integer" Value="1" 
           KeyPath="yes"> 
       </RegistryValue> 
      </RegistryKey> 
      <Shortcut Advertise="no" Directory="ApplicationProgramsFolder" 
         Name="ServiceCC" 
         Target="[INSTALLLOCATION]Service.exe" 
         Id="SHORTCUT_serv" 
         WorkingDirectory="INSTALLLOCATION"> 
      </Shortcut> 
      <RemoveFile Id="remove_serviceshort" Name="ServiceCC" On="uninstall"/> 
      <RemoveFolder Id="ApplicationProgramsFolder" On="uninstall"/> 
     </Component> 
4

你在你的代码错误。

相反的:

<RemoveFolder Id="ApplicationShortcut1" On="uninstall"/> 

用途:

<RemoveFolder Id="ProgramMenuSubfolder" On="uninstall"/> 

这应该这样做。

5

在我的情况下,在组件上,我有GUID =“*”,并且shorcuts没有被删除。

我使用了一个硬编码的GUID,例如:Guid =“cc509cb7-c1a1-46cf-8c62-7cbb0017783c”,并且删除了快捷方式。

问候。

0

在我的情况下,我尝试了不同的选项,并且有一个注释掉的部分具有相同的GUID。将其更改为其他GUID,即使另一个被注释掉,也可以工作。

相关问题