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

Comments

Please log in to comment

Community Chosen Answer

2

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.

Answered 04/27/2012 by: dchristian
Red Belt

  • 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.
  • 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][:][\\]")
  • 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.
Please log in to comment

Answers

1

I would just search for the shortcut and replace them all with the good one... keep it simple.

Answered 04/30/2012 by: GAKIS
Second Degree Green Belt

Please log in to comment
Answer this question or Comment on this question for clarity

Share