/build/static/layout/Breadcrumb_cap_w.png

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)

Posted by: dchristian 11 years ago
Red Belt
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.


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
Fourth Degree Green Belt
1

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

Don't be a Stranger!

Sign up today to participate, stay informed, earn points and establish a reputation for yourself!

Sign up! or login

View more:

Link

Related Links

Post

Related Posts

Share

 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ