I have a batch script which needs to work with Windows XP (for the time being) and Windows 7. The script also copies a link to the Windows Desktop.
copy /Y path\to\the\link.lnk %ALLUSERSPROFILE%\Desktop\link.lnk
This works on Windows XP but not on Windows 7. There %ALLUSERSPROFILE%\Desktop is a junction and even with the admin account I get "Access denied" when executing the command. I thought junctions were there to forward me to the correct location (%PUBLIC%\Desktop in this case), but it seems it does not work.
Any way I can make a XP/7 compatible command line?