How to Execute Programs With VBS

Visual Basic Scripting (VBS) is a language used to automate processes on remote machines. The files use the .vbs file extension, and Windows runs them automatically when you double-click the file or add it to a start-up directory. The scripting files are normally used by network administrators. Network administrators can map drives, add printers and run programs on the user's machine as soon as he logs into Windows.

Instructions

    • 1

      Right-click the VBS file you want to edit and select "Open With." Select "Notepad" from the list of programs. You can also start a new script by opening Notepad.

    • 2

      Open a shell object. The shell object runs the executable files located on the machine. The code below creates the object:
      Set my_shell = CreateObject("WScript.Shell")

    • 3

      Run the program from the VBS file. The shell object opened previously has a "run" method that executes software. The code below runs the software:
      my_shell.Run "c:\windows\my_program"
      Replace "my_program" with the executable you want to run.

    • 4

      Close the shell objects. You need to close the shell object and remove it from memory. The code below deletes the shell object:
      Set my_shell = Nothing

    • 5

      Save the file to your hard drive. Make sure you save it with a .vbs extension. Double-click it to test the programming. The file runs and executes the software indicated in the script.

Related Searches:

References

Comments

You May Also Like

  • How Execute VBS Script

    A VBS script is a file that contains VBScript or Visual Basic Scripting codes. You can examine the script's contents by opening...

  • How to Plan a Vacation Bible School

    Planning a vacation bible school program can be a huge undertaking. You will need a committee of dedicated volunteers who have a...

  • VBS Scripts Won't Run

    All versions of Windows starting from Windows 95 are capable of running VBS files. VBS or VBScript files contain Visual Basic code...

  • How to Run VBS Script From Java

    One way to dramatically increase your programming power is to mix and match the features of various programming and scripting languages to...

  • How to Plan a Successful Vacation Bible School Program

    Planning a successful Vacation Bible School program takes time, commitment and hard work. Since many churches make this an annual event for...

  • How to Create a VBS Script

    VBScript is a scripting language derived from Microsoft's Visual Basic language. VBScript can run on Web servers and, on the client side,...

  • How to Execute BAT VBS Shells

    Windows has a shell that allows you to communicate with the operating system. Using a scripting language such as VBS, you can...

  • How to Run a Vacation Bible School

    Many children look forward to Vacation Bible School (VBS) as a time to interact with other kids and feel closer to God....

  • How to Get Volunteers to Run Church Programs

    The most difficult aspect of getting volunteers to run church programs is recruiting the volunteers. Most volunteers get involved to make a...

  • How to FTP a File Using VBS

    VBS or Visual Basic Script is a scripting language that can be used for client side web development in Internet Explorer, server...

  • How to Develop a Baptist Vacation Bible School Program

    The main goal in developing a vacation Bible school (VBS) program is to make sure the children have fun, learn about God,...

  • How to Loop a VBS Script

    Microsoft Visual Basic Script (VBS) language allows users to add additional functions to their Window applications. It also gives you the ability...

  • VBS Closing Program Ideas

    VBS Closing Program Ideas. Teachers and children put a lot of work into Vacation Bible School, and it's important to have a...

  • How to Make a Program Run at Startup

    Making a computer program run at startup is a convenience that no computer user should ever overlook. If a computer system is...

  • How to Hide a VBS Script

    Hiding VBS scripts on a Windows file system is a relatively easy task. There are a number of methods for hiding scripts...

  • Ideas to Announce VBS

    Ideas to Announce VBS. Make announcing your church's next VBS (Vacation Bible School) program something to remember. VBS programs usually last a...

  • How to Use VBS to Start Service Automatically

    Visual Basic Scripting (VBS or VBScript) is a plain text coding language that is based on Microsoft's Visual Basic programming language. VBS...

  • How to Open VBS Files

    VBS, or Visual Basic, is a simple programming language developed by Microsoft. Visual Basic appeals to those who are not necessarily software...

  • How to Start a Vacation Bible School at Your Church

    Vacation Bible school (VBS) is an excellent experience for kids of all ages during the summer months. VBS provides fun, day-long activities...

Related Ads

Featured