You didn’t specify a type of script (VBS vs. BAT), but here is a VB script that is system agnostic. Not my script, I pulled it from this Microsoft site. According to that page it’s been verified to work on Windows 2000, XP, Vista, and 7.
'''''''''''''''''''''''''''''''''' ' ' This VB script removes the requested desktop shortcuts ' ' Change only the file name (test.lnk) ' ' Script created by Holger Habermehl. October 23, 2012 '''''''''''''''''''''''''''''''''' Set Shell = CreateObject("WScript.Shell") Set FSO = CreateObject("Scripting.FileSystemObject") DesktopPath = Shell.SpecialFolders("Desktop") FSO.DeleteFile DesktopPath & "\test.lnk"
EDIT
The above code will look at the specific user's desktop (i.e. Username "john" logs in, the code will look at "C:\Users\john\Desktop\" or "C:\Documents and Settings\john\Desktop"). If you want to check the public desktop, then change the line that reads
DesktopPath = Shell.SpecialFolders("Desktop")
to
DesktopPath = Shell.SpecialFolders("AllUsersDesktop")
But note that depending on the user's privileges and when you run the script, they may get a UAC box asking to sign in as an admin on Windows Vista/7. I'd run the script in a GPO as a computer startup script.