哪个Windows系统属性从SQL Windows搜索中返回实际路径?

huangapple go评论75阅读模式
英文:

Which Windows System Property returns actual path from SQL Windows Search

问题

以下是您要翻译的内容:

我正在使用SQL查询Windows搜索

SELECT System.ItemName, System.ItemPathDisplay 
FROM SystemIndex 
WHERE SCOPE = 'file:C:/ProgramData/Microsoft/Windows/Start Menu' 
  AND System.ItemName LIKE '%remote%'

这是返回的用户友好路径

Remote Desktop Connection.lnk;C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Windows Accessories\Remote Desktop Connection.lnk;

实际路径应为“Accessories”而不是“Windows Accessories”

C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Accessories\

如何从Windows搜索获取真实路径?

所有“System.*”属性似乎只返回“友好路径”。

英文:

I am querying Windows Search using SQL

SELECT System.ItemName, System.ItemPathDisplay 
FROM SystemIndex 
WHERE SCOPE = 'file:C:/ProgramData/Microsoft/Windows/Start Menu' 
  AND System.ItemName LIKE '%remote%'

And this is what is returned with the user friendly path

Remote Desktop Connection.lnk;C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Windows Accessories\Remote Desktop Connection.lnk;

The real path should be Accessories NOT Windows Accessories

C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Accessories\

How do I get the real path from Windows Search?

All System.* properties seem to only return the 'friendly path'

答案1

得分: 0

System.ItemUrl似乎给了我所需的内容:

Remote Desktop Connection.lnk;file:C:/ProgramData\Microsoft\Windows\Start Menu\Programs\Accessories\Remote Desktop Connection.lnk;
英文:

Seems like System.ItemUrl gives me what I need

Remote Desktop Connection.lnk;file:C:/ProgramData\Microsoft\Windows\Start Menu\Programs\Accessories\Remote Desktop Connection.lnk;

huangapple
  • 本文由 发表于 2023年6月30日 00:41:56
  • 转载请务必保留本文链接:https://go.coder-hub.com/76583035.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定