VBS is a programming language used to automate processes on remote devices. The files use.vbs file extension, and Windows runs on double clicking or adding it to a start-up directory. Network administrators can track drives, add printers and run programs on user's device after logging in.
- Right click VBS file to edit and click "Open With." Choose "Notepad".
- Open shell object. The shell object runs executable files. The code given below makes object:
Set my_shell = CreateObject("WScript.Shell")- Run application from VBS file. The shell object earlier opened has "run" technique to execute program. The code given below runs software:
my_shell.Run "c:\windows\my_program"
"my_program" is the executable to run.- Close shell objects. To close shell object delete it from the memory. The code given below removes shell object:
Set my_shell = Nothing- Store file using .vbs extension.



Reply With Quote
Copyright Techfuels
Bookmarks