如何找到广告快捷方式的目标?

Ton*_*ony 14 windows shortcuts microsoft-office-2010

编辑:最初我使用的标题是“如何找到 MS-Office 快捷方式的目标?” 但后来更改了它,因为问题并非特定于 MS-Office 快捷方式。

我安装了 MSOffice 2010 OneNote,开始菜单中的快捷方式有以下属性:

在此处输入图片说明

如您所见,Target信息是通用的,Find Target按钮是灰色的。

如何找到快捷方式指向的文件?

编辑:我正在寻找快捷方式的目标,因此我可以将它与 Microsoft 键盘上的“收藏夹”键之一一起使用。然而,当我想找到目标的位置时,我忘记了我可以只设置收藏夹指向这个快捷方式,而不是可执行文件。

尽管这解决了我的问题,但我们仍然想知道如何在广告快捷方式中找到目标文件的位置。

use*_*001 5

尝试以下任一方法(来自Tek-Tips 论坛):

脚本

' GetRealTarget.vbs
' This version needs to be run under wscript engine rather than cscript

' Pass the full path to an MSI "Advertised Shortcut" lnk file (including the extension) as a parameter
' e.g. assuming that we have a default install of Office 2003 for All Users:
' GetRealTarget "C:\Documents and Settings\All Users\Start Menu\Programs\Microsoft Office\Microsoft Office Excel 2003.lnk" 
' Displays fully resolved target for the MSI shortcut

Option Explicit
Dim MSITarget

On Error Resume Next ' just some simple error handling for purposes of this example
If wscript.arguments.count = 1 Then ' did actually pass an MSI advertised shortcut? Or, at least, a parameter that could be such a thing?
   With CreateObject("WindowsInstaller.Installer")
      Set MSITarget = .ShortcutTarget(wscript.arguments(0))
      If Err = 0 then
         MsgBox .ComponentPath(MSITarget.StringData(1), MSITarget.StringData(3))
      Else 
         MsgBox wscript.arguments(0) & vbcrlf & "is not a legitimate MSI shortcut file or could not be found"
      End If
   End With
End If
On Error Goto 0
Run Code Online (Sandbox Code Playgroud)

PowerShell(安装此Windows Installer Module

get-msiproductinfo | where { $_.ProductState -match "Installed" } | fl AdvertisedProductName, InstallLocation
Run Code Online (Sandbox Code Playgroud)


Mok*_*bai 4

这些似乎是“广告快捷方式”,即它们破坏了某些功能,例如“查找目标”功能,以便允许它显示有关程序的信息,例如 Excel 快捷方式显示“执行计算等等”

它似乎惹恼了互联网上的不少人:

http://www.dotnetmonster.com/Uwe/Forum.aspx/vs-setup/1894/Setup-creates-shortcut-with-find-target-grayed

啊,看起来有人问过这样的问题: https: //stackoverflow.com/questions/1270779/why-is-the-target-disabled-in-dot-net-shortcuts-after-setup