我想知道一种方法,使我的。vbs文件到。exe文件。
是可能的吗?
代码:
Option Explicit
Dim oShell : Set oShell = WScript.CreateObject ("WScript.Shell")
Dim FSO : set FSO = CreateObject("Scripting.FileSystemObject")
Dim StartTime,Elapsed
'msgBox(oShell.CurrentDirectory)
'MsgBox(FSO.GetFile(Wscript.ScriptFullName).ParentFolder )
oShell.CurrentDirectory = FSO.GetFile(Wscript.ScriptFullName).ParentFolder
StartTime = Timer
IF NOT oShell.run( "ParentChildLinkFinal.vbs", 1, True) = 0 then Wscript.Quit
IF NOT oShell.run( "Parent_Child_Merge_final.vbs", 1, True) = 0 then Wscript.Quit
Elapsed = Timer - StartTime
MsgBox("Total time taken to finish this task:" & Elapsed & "in Seconds")
您可以使用这个实用程序来实现它http://www.vbs2exe.com/