Calling a Batch (.bat) file from a VBS file

Posted on 2005-05-11
Last Modified: 2010-04-17
From a VBS file, is it possible to call a Batch file?

From a Batch file, I know that if you issue the command "call test.bat", this will actually call another the test.bat file.

How can this be done in a VBS script file? How do you call a Batch (.bat) file from a VBS file?

Question by:ben1211
    1 Comment
    LVL 2

    Accepted Solution

    Check the documentation for the run method and try this:

    Set WshShell = WScript.CreateObject("WScript.Shell")"\\server\folder\setup.bat",7,true)


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Top 6 Sources for Identifying Threat Actor TTPs

    Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

    Suggested Solutions

    How to remove superseded packages in windows w60 or w61 installation media (.wim) or online system to prevent unnecessary space. w60 means Windows Vista or Windows Server 2008. w61 means Windows 7 or Windows Server 2008 R2. There are various …
    This is an explanation of a simple data model to help parse a JSON feed
    An introduction to basic programming syntax in Java by creating a simple program. Viewers can follow the tutorial as they create their first class in Java. Definitions and explanations about each element are given to help prepare viewers for future …
    In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …

    761 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    10 Experts available now in Live!

    Get 1:1 Help Now