How to Use VBS to Start Service Automatically
- 1). Click the "Start" button and select the "All Programs" option. Select "Accessories" and click "Notepad."
- 2). Create a variable to hold a shell object. The shell object will enable you to interact with the operating system. Type "Dim myShell" and press "Enter."
- 3). Create a new Wshell object by typing "myShell = CreateObject("WScript.Shell")" and press "Enter."
- 4). Call the "Run" command on your shell object. Type "myShell.Run "programfile.exe" replacing "programfile" with the name of the executable file that you want the script to open.
- 5). Save the file using the .vbs extension. Double-click the file to run the script.