Wscript. Shell object details !! (2)

Source: Internet
Author: User
Folder, Start Menu folder, and personal document folder.

Syntax
Wshshell. specialfolders = obw.shspecialfolders

Example
'This code fragment shows how to access the Desktop Folder
Set wshshell = wscript. Createobject ("wscript. Shell ")
Msgbox "your desktop is" & wshshell. specialfolders ("desktop ")
See
Wshspecialfolders object

Wshspecialfolders object
This object is not provided directly. To obtain the wshspecialfolders object, use the wshshell. specialfolders attribute.

Progid N/
File Name wshom. ocx
CLSID
IID

The following table describes the attributes associated with the wshspecialfolders object.

Attribute description
Item specifies the full path of the folder (default ).
Count refers to the number of enumerated items.
The number of length enumeration items (jscript ).

Wshspecialfolders. Item
The full path of the folder specified by strfoldername is returned. It is the default property.

Syntax
Wshshell. specialfolders. Item ("strfoldername") = strfolderpath
Wshshell. specialfolders ("strfoldername") = strfolderpath

Note
If the requested folder (strfoldername) is unavailable, wshshell. specialfolders ("strfoldername") returns NULL. For example, Windows 95 does not have the allusersdesktop folder. If strfoldername = allusersdesktop, null is returned.

Windows 95 and Windows NT 4.0 provide the following specified folders:
Allusersdesktop
Allusersstartmenu

Allusersprograms

Allusersstartup

Desktop

Favorites

Fonts

Mydocuments

Nethood

Printhood

Programs

Recent

Sendto

Startmenu

Startup

Templates

Example
'This fragment returns the full path for the Windows Desktop Folder
Set wshshell = wscript. Createobject ("wscript. Shell ")
& Nbs

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.