Link to home
Start Free TrialLog in
Avatar of WellingtonIS

asked on

desktop shortcuts

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?
Avatar of Lee W, MVP
Lee W, MVP
Flag of United States of America image

Link to home
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
:) remove 1 > from your last cmd line
No, if you do that, you overwrite the log file and end up with ONLY the allusersprofile list.

>> = append

Using > first overwrites the existing one at logon and the >> appends the allusers to the newly created log file.
:) I thought you used 2 files, 1 for the user, the other for 'all users'... You are right!
Avatar of WellingtonIS


All my shortcuts are on all users desktop because that's where I put them.  Can I use pexec to run that script?
Or maybe a loging or startup script?
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"
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/
one more question.  Save this as a bat or vbs?
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).
I tried them both.  However, it's not recording all the shortcuts only 1?
I figured out y... I need both .url and lnk I added them and it works.
I just had to modify a bit but it works and its just what I needed.  thanks.