Simple if then copy operation failing

(imported topic written by PKLumos)

I’m trying to copy a file to the all users desktop, and obviously these locations are different in Windows XP and Windows 7.

This is what I have so far, and it fails…

if {(name of it = "Win7" AND NOT x64 of it) OR (name of it = "Win7" AND x64 of it)} of operating system then copy  __Download\"Database_Version 3-00.accde - Shortcut.lnk" "c:\users\public\Desktop\Database_Version 3-00.accde - Shortcut.lnk"
else copy  __Download\"Database_Version 3-00.accde - Shortcut.lnk" "c:\documents and settings\all users\Desktop\Database_Version 3-00.accde - Shortcut.lnk"

What am I doing wrong?

(imported comment written by PKLumos)

Hmm…I think I may have figured it out.

if {name of operating system = "Win7"}
copy  __Download\"CAP Tracking Database_Version 3-00.accde - Shortcut.lnk" "c:\users\public\Desktop\CAP Tracking Database_Version 3-00.accde - Shortcut.lnk"
else
copy  __Download\"CAP Tracking Database_Version 3-00.accde - Shortcut.lnk" "c:\documents and settings\all users\Desktop\CAP Tracking Database_Version 3-00.accde - Shortcut.lnk"
 
endif

(imported comment written by jgolembi)

You could also use this:

copy  __Download\"CAP Tracking Database_Version 3-00.accde - Shortcut.lnk" "{pathname of (value "Common Desktop" of key "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders" of registry as folder)}\CAP Tracking Database_Version 3-00.accde - Shortcut.lnk"

-John G