@SHFOLDER[n] : Returns the full pathname for the specified Windows folder (which vary in different versions of Windows and if the user has altered the defaults).
n is a number from 0 to 59 that returns the following values:
| 6 - <user name>\Favorites |
| 7 - Start Menu\Programs\Startup |
| 11 - <user name>\Start Menu |
| 22 - All Users\Start Menu |
| 23 - All Users\Start Menu\Programs |
| 26 - <user name>\Application Data |
| 27 - <user name>\PrintHood |
| 28 - <user name>\Local Settings\Application Data (non roaming) |
| 29 - non localized startup |
| 30 - non localized common startup |
| 35 - All Users\Application Data |
| 37 - Windows system directory |
| 39 - <user name>\My Pictures |
| 41 - X86 system directory on x64 |
| 42 - x86 c:\Program Files on x64 |
| 43 - c:\Program Files\Common |
| 44 - x86 Program Files\Common on x64 |
| 47 - All Users\Start Menu\Programs\Administrative Tools |
| 48 - <user name>\Start Menu\Programs\Administrative Tools |
| 54 - All Users\My Pictures |
| 59 - USERPROFILE\Local Settings\Application Data\Microsoft\CD Burning |
Examples:
echo %@shfolder[42]
C:\Program Files (x86)
echo %@shfolder[22]
C:\ProgramData\Microsoft\Windows\Start Menu