Microsoft® Windows® Script Host SpecialFolders Property |
WSH Reference Version 1 |
Provides the WshSpecialFolders object for accessing Windows shell folders such as the desktop folder, the Start menu folder, and the personal document folder.
object.SpecialFolders(objWshSpecialFolders)
Part Description object WshShell object. objWshSpecialFolders The name of the special folder to return.
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.The following special folders are provided with the Windows 95 and Microsoft Windows NT 4.0 operating systems:
AllUsersDesktop
AllUsersStartMenu
AllUsersPrograms
AllUsersStartup
Desktop
Favorites
Fonts
MyDocuments
NetHood
PrintHood
Programs
Recent
SendTo
StartMenu
Startup
Templates
The following example accesses the desktop folder and displays its name:Set WshShell = WScript.CreateObject("WScript.Shell") MsgBox "Your desktop is " & WshShell.SpecialFolders("Desktop")