Set shellapp = CreateObject("Shell.Application")
'获取所有桌面的窗口:
Set oWindows = shellapp.Windows
'执行文件:
shellapp.ShellExecute("ipconfig.exe","/all")
shellapp.ShellExecute("notepad.exe")
'创建子文件夹:
sDir= "c:/automation"
set oFolder = shellapp.NameSpace(sDir)
oFolder.NewFolder("Newfolder")
'获取文件夹内容信息:
set oitems = oFolder.items
For each oitem in oitems
print oitem.name
Next
'以资源管理器的形式浏览指定的文件夹内容
shellapp.Explore "c:/automation"