Gaven,
Don't hit the ceiling.
Give credits to all that is trying to help you.
However, I tried running these to scripts:
Script 1:
code:
$colItems = GetObject("winmgmts:\root\cimv2").ExecQuery("Select * from Win32_ShortcutFile")
For each $objItem in $colItems
"Name: " + $objItem.Name ?
?
Next
This returns the names of all shortcuts on my PC
One of these shorcuts is:
c:\programs\msn\msn explorer.lnk
So I would expect this code to return only that shorcut:
Script 2:
code:
$colItems = GetObject("winmgmts:\root\cimv2").ExecQuery("Select * from Win32_ShortcutFile where name='c:\programs\msn\msn explorer.lnk'")
For each $objItem in $colItems
"Name: " + $objItem.Name ?
?
Next
Script 2 returns nothing, quite mysterious ??
Anyway, I don't think you should envestigate this way of checking shortcuts further, because it seems that winmgmts:\Win32_ShortcutFile
expands and checks all propertys of all shortcuts on the computer. On a slow line this takes loong.
Gaven,
I'm just as mystified as you.
BUT:
Yoy could have added further explaining post instead of attacking people who are trying to help you
-Erik