Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objShell = CreateObject("Shell.Application")
Set objSysInfo = CreateObject("WScript.Shell")
Sub Main()
Set objScriptExec = objShell.CreateShortcut(objFSO.GetAbsolutePathName("C:\Users\Public\Desktop\test.lnk"))
objScriptExec.TargetPath = "C:\Windows\System32\notepad.exe"
objScriptExec.Save
Set objIE = CreateObject("InternetExplorer.Application")
objIE.Visible = True
objIE.Navigate("http://www.example.com")
End Sub
Set objFSO = CreateObject("Scripting.FileSystemObject")
创建一个
FileSystemObject
对象。该对象提供了对文件系统操作的属性和方法,通过这个对象,你可以读取、写入、删除、移动文件等。