Set WshShell = Wscript.CreateObject("Wscript.Shell") WshShell.Run ("notepad " & Wscript.ScriptFullName) '上面用SHELL對象啟動程序
Set fs = Wscript.CreateObject("Scripting.FileSystemObject") Set a = fs.CreateTextFile("c:/testfile.txt", True) a.WriteLine("這是一個測試。") a.Close '用COM對象Scripting.FileSystemObject操作文本文件