We have a batch file which creates shortcuts on Windows 2003 machines. The command which we use is something like:
echo copy the shortcut to the server All Users folder for windows 2003... xcopy "%OutputDir%%LocalOutputDir%\Shortcuts\*.*" "\\%SERVERNAME%\c$\Documents and Settings\All Users\Start Menu\Programs\Startup\*.*"
Now, we have some new Windows 2008 machines also and their path of the Shortcut folder (ALL USERS) is different (C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Startup).
So my question is how do we put an if condition so that if the batch file doesn't find the location of 2003, it saves the shortcut in the location of the 2008 machine...