Set objFS = CreateObject("Scripting.FileSystemObject")
Set objShell = CreateObject("WScript.Shell")
strCurrentDirectory = objShell.SpecialFolders("AllUsersDesktop")
Set objShell = CreateObject("Shell.Application")
Set objFolder = objShell.Namespace(strCurrentDirectory)
Set objFolderItem = objFolder.Self
strCurrentDirectory = objShell.SpecialFolders("AllUsersDesktop")
脚本在最后一行崩溃
错误信息是
Microsoft VBScript 运行时错误 (59, 1):对象不支持此属性或方法:'objShell.SpecialFolders'
* 脚本完成 - 退出代码:259 *
我使用http://www.wisesoft.co.uk/scripts/vbscript_display_special_folder_locations.aspx作为参考。