Although we will switch ASAP from Windows XP to Windows 7, we still have a lot of clients running XP and I think it will takes us up to two years to finally switch the last machine.
One of the problems in the automatic jobs we are using is that Windows 7 has new paths for both the shared desktop and the shared start menu.
As an easy solution for this, we are now using this batch script. It will save the correct path to the two variables DESKTOP_FOLDER and STARTMENU_FOLDER and the real job simply uses them. That way, the scripts works on either XP or Win7.
I know there is a symbolic link “Startmenu” inside \ProgramData in Win7 but some programs refuse to with the link. That’s why I’m using the “real” path here.
IF "%PUBLIC%"=="" GOTO NO_PUBLIC
Rem PUBLIC env var not here, assuming XP
Rem Public Variable found
SET STARTMENU_FOLDER=%ALLUSERSPROFILE%\Microsoft\Windows\Start Menu
echo Desktop folder is %DESKTOP_FOLDER%
echo Start menu folder is %STARTMENU_FOLDER%