Friday, December 16, 2022

[FIXED] How to execute a vbscript from another vbscript?

Issue

For example, if I have two vbscript files: A.vbs and B.vbs. I would like the vbscript in B.vbs to execute A.vbs, such peudo-code would look like the following:

'B.vbs
execute("A.vbs")

Just as simple as this line, but I couldn't really find a valid syntax to accomplish such task. Hope someone could help me out, thanks.


Solution

Dim oShell 
Set oShell = Wscript.CreateObject("WScript.Shell")
oShell.Run "name_of_vbs_file_here.vbs"   
Set oShell = Nothing 


Answered By - Sorceri
Answer Checked By - Mildred Charles (PHPFixing Admin)

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.