Detect a desktop shortcut and the path
Is there a way to have K1000 detect a desktop shortcut and also log the path it is point to? We are looking to see how many systems have the old shortcut location still.
0 Comments
[ + ] Show comments
Answers (2)
Please log in to answer
Posted by:
dchristian
11 years ago
If you know where the shortcut *should* be you could use custom inventory rules. Otherwise you would need to write a script to perform a search of the filesystem.
Comments:
-
The shortcut is in the all users desktop. What I need more is the path it is pointing at as we have the same shortcut pointing to 2 different locations and want to clean that up. - ckubaska 11 years ago
-
OOOOOH i got you. You could use custom inventory rules.
For web shortcuts:
ShellCommandTextReturn(cmd.exe /c type "path to your shortcut.lnk")
For program shortcuts (only works on Win7)
ShellCommandTextReturn(cmd.exe /c type "path to your shortcut.lnk" | |find "\"|findstr/b "[a-z][:][\\]") - dchristian 11 years ago -
I wish that worked on windows xp. The systems that will have the shortcut pointing to the old location will be windows xp. I could replace the shortcuts with a new on pointing to the new location but it will require a software upgrade so I was looking for a way to pick out which systems were needing upgraded.
Windows doesn't seem to store the patch of the shortcuts that I can find.
Thanks a bunch for helping. - ckubaska 11 years ago
Posted by:
GAKIS
11 years ago