0

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'

Michael T
  • 619
  • 6
  • 19

1 Answers1

0

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;
Michael T
  • 619
  • 6
  • 19