Script help - copying shortcuts to Win7 AND XP All Users Desktops?
Hi all (yet again.)
I've come across a problem with this script I've knocked up which works for XP in copying desktop shortcuts, but not for Windows 7:
I get a 800a0046 permission denied message on Windows 7. Not the best at scripting to be honest, and not sure how to go about making this work for 7 and XP together. I'm guessing some sort of variable based on OS? Is there some dodgy WMI-filtered alternative if using 7 and XP together? Would much rather have just the one script doing the business though, so if anyone can help me I'd be extremely grateful.
sSource = "\\lhsdc1\netlogon\staffdesktop\*"
set oWShell = createobject("Wscript.Shell")
sDestination = oWShell.SpecialFolders("AllUsersDesktop")
set oFSO = createobject("Scripting.FileSystemObject")
oFSO.CopyFile sSource, sDestination, True
Like, beer grateful. :)