How to run a file using VisualBasicScript (.vbs)

后端 未结 6 1551
你的背包
你的背包 2020-12-10 06:57

How can I run a file with VisualBasicScript (.vbs)?

The file is \'file.bat\' and it\'s located in the same dir as the .vbs.

6条回答
  •  春和景丽
    2020-12-10 07:36

    Use the FileSystemObject

    Usage to open file:

    Const ForReading = 1
    Set objFSO = CreateObject("Scripting.FileSystemObject")
    Set objFile = objFSO.OpenTextFile(".\File.bat", ForReading)
    

提交回复
热议问题