The Item property returns the full path for the special folder specified by strFolderName. It is the default property.
WshShell.SpecialFolders.Item("strFolderName") = strFolderPath WshShell.SpecialFolders("strFolderName") = strFolderPath
WshShell.SpecialFolders("strFolderName") returns NULL if the requested folder (strFolderName) is not available. For example, Windows 95 does not have an AllUsersDesktop folder and returns NULL if strFolderName = AllUsersDesktop
AllUsersStartMenu
AllUsersPrograms
AllUsersStartup
Desktop
Favorites
Fonts
MyDocuments
NetHood
PrintHood
Programs
Recent
SendTo
StartMenu
Startup
Templates
' This fragment returns the full path for the Windows Desktop folder Set WshShell = Wscript.CreateObject("Wscript.Shell") StrMyDesktop = WshShell.SpecialFolders("Desktop") ' List all special folders For Each strFolder In WshShell.SpecialFolders MsgBox strFolder Next
WshShell.SpecialFolders property