1 Set fso = CreateObject("Scripting.FileSystemObject")
2 path = fso.GetSpecialFolder(0)
2 path = fso.GetSpecialFolder(0)
GetSpecialFolder可以传几个参数,如下:
| Constant | Value | Description |
|---|---|---|
| WindowsFolder | 0 | The Windows folder contains files installed by the Windows operating system. |
| SystemFolder | 1 | The System folder contains libraries, fonts, and device drivers. |
| TemporaryFolder | 2 | The Temp folder is used to store temporary files. Its path is found in the TMP environment variable. |