How to Run EXE Remotely for VBS
Visual Basic Scripting lets you manage network computers from an executable file. You must have rights on the remote computer to run the EXE file. The VBS file uses the network path of the computer and the Windows Management Instrumentation to run the remote software. You use this feature to install software, run driver installations and control permissions on a network computer.
Instructions
-
-
1
Click the Windows "Start" button and type "notepad" in the search text box. Press "Enter" to open the Notepad software.
-
2
Create a linked variable to the remote network computer's WMI. Add the following code to your Notepad window:
Set wmi = GetObject("winmgmts:\\computername\root\cimv2:Win32_Process")
Replace "computername" with the name of the remote computer you want to access.
-
-
3
Specify the EXE file you want to run. The following code executes the EXE file on the remote computer:
intReturn = wmi.Create("EXE", Null, Null, intProcessID)
Replace "EXE" with the file you want to execute.
-
4
Click the "File" menu item and select "Save As." Type a name for the VBS file with the ".vbs" file extension. Select "All Files" from the "File Type" drop-down box. Click "Save" to create the file.
-
1