desktop shortcuts

WellingtonIS
WellingtonIS used Ask the Experts™
on
I have approx 1200 xp pro desktop and laptop machines.  Is there any way I can do an inventory of what shortcuts are on the desktops?
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Technology and Business Process Advisor
Most Valuable Expert 2013
Commented:
Shortcuts are typically specific to the user - there may be a few on the "all users" desktop, but you need this from the user level.

Add to the logon script something like this...
dir /b "%userprofile%\desktop\*.lnk">\\server\share-to-store-shortcut-info\%computername%-%username%-shortcuts.log
dir /b "%allusersprofile%\desktop\*.lnk">>\\server\share-to-store-shortcut-info\%computername%-%username%-shortcuts.log

Open in new window


That should create a log file on a server's share named after the computer name and user name for the computer the user is logged in to listing all shortcuts.
Gerwin Jansen, EE MVETopic Advisor
Most Valuable Expert 2016

Commented:
:) remove 1 > from your last cmd line
Lee W, MVPTechnology and Business Process Advisor
Most Valuable Expert 2013

Commented:
No, if you do that, you overwrite the log file and end up with ONLY the allusersprofile list.

>> = append
> = OVERWRITE.

Using > first overwrites the existing one at logon and the >> appends the allusers to the newly created log file.
11/26 Forrester Webinar: Savings for Enterprise

How can your organization benefit from savings just by replacing your legacy backup solutions with Acronis' #CyberProtection? Join Forrester's Joe Branca and Ryan Davis from Acronis live as they explain how you can too.

Gerwin Jansen, EE MVETopic Advisor
Most Valuable Expert 2016

Commented:
:) I thought you used 2 files, 1 for the user, the other for 'all users'... You are right!

Author

Commented:
All my shortcuts are on all users desktop because that's where I put them.  Can I use pexec to run that script?

Author

Commented:
Or maybe a loging or startup script?
Lee W, MVPTechnology and Business Process Advisor
Most Valuable Expert 2013

Commented:
No because PSEXEC runs as the user you specify - you need to run it as the USER who you want the list for.  That's why the login script makes the most sense.  You could, I suppose, push the script to their "all users profile" "startup" group on each PC so it executes when the logon without necessarily being a part of the logon script (you shouldn't need to use PSEXEC for that because (I assume) you have admin rights to all those systems).  But when you do things like that you HAVE to be certain that the paths are always the same - they COULD be different - Vista and 7 store user profiles in C:\Users by default while XP and 2000 use "C:\Documents and Settings"

Author

Commented:
The local user has no rights to install or run anything.  I will try to run it as a startup script in a test and let you know.  Thx/

Author

Commented:
one more question.  Save this as a bat or vbs?
Lee W, MVPTechnology and Business Process Advisor
Most Valuable Expert 2013

Commented:
Those commands are basic Windows commands and likely won't be impacted by restrictions.  The user needs rights to save that log file to the share (read/write), but otherwise, that should do it.  

What I've posted is a simply batch file - .cmd or .bat (99.9% the same).

Author

Commented:
I tried them both.  However, it's not recording all the shortcuts only 1?

Author

Commented:
I figured out y... I need both .url and lnk I added them and it works.

Author

Commented:
I just had to modify a bit but it works and its just what I needed.  thanks.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial