I’ve been using VBScript for many years. Below, I share the 3 different ways you can run VBScript on a Windows PC including running VBSCript as an Administrator.
3 Methods of Running VBScripts
- Run VBSCript in Windows Explorer
- Run VBScript from Windows Command Line
- Run VBScript as a Windows Administrator
For more VBScript info, try these excellent VBScript resources:
1. Run VBScript in Windows Explorer
- Locate the VBScript file using Windows Explorer or place a copy on your Desktop
- Identify VBScript files by the .vbs file extension
- Double click the VBScript file.
- You may or may not see anything depending on the program design.
- To check to see if VBScript is running.
- Run Windows task Keys Ctrl+Shift+Esc then sort by Image Name. Look for “wscript.exe”.
- To kill a VBScript process, right click over “wscript.exe” and select “end process”.
- You may see more than one “wscript.exe” on the task manager list as it can be run multiple times and new instances will execute.
2. Run VBScript from Windows Command Line
- Click Windows Start
- Open Command Window by Typing “CMD” and hit Enter
- Enter the full file path at the Command Line and hit Enter
3. Run a VBScript as a Windows Administrator
To run a VBScript as a Windows Admin:
- Create a Windows Batch File that uses WScript.exe to open the .vbs file (See example below)
- Run Windows Batch file as Admin and Admin Rights pass thru to the VBScript
Example Windows Batch File
Save the file below with a .cmd file extension. Then right click on it and select “Run as Admin”. Admin rights will be passed on to the VBScript
Many blogs and web applications are being hosted on cloud based web servers. Of those web servers, many are running some flavor of the Linux operating system (OS).
If you’re a Windows PC user who is using a Linux web server for your online project then you have unique challenge that comes with being a dual OS user.
How will we transfer our files from our Windows development PC to our Linux cloud hosted blog or web app? Enter Putty and the PSCP command line tool!
What is Putty?
Putty is a Client application that handles connections to remote computers via the Telnet, SFTP and SSH protocols.
What is PSCP?
PSCP is a command line application that is typically included in the Putty installation. PSCP transfers files between two computers from the Windows command line as long as firewalls allow the traffic on the designated ports for each type of traffic.
Transferring Files with PSCP from the Command Line
If you’ve installed Putty in the default directory, it will be here.
Open a Windows command line by clicking on the Windows start menu icon then entering “cmd” in the search field then find and click on the cmd icon.
Navigate to the Putty Directory by entering the command below.
C:\>CD c:\Program Files\Putty
Let’s look at an example PSCP command to transfer a file from a Windows PC to a Linux cloud web server with a fake user named root, IP of 18.104.22.168 and a target folder of /var/www/html
PSCP Command Example
c:\>C:\Program Files\Putty\pscp c:\temp\sample.txt firstname.lastname@example.org:/var/www./html
That’s all you should need to know about connecting to a Linux cloud based web server from a Windows PC using the Putty SSH client.
Hope this helps you on your Cyber journey!