With Windows 2000 and higher, Microsoft included a program called "Windows Scripting Host" (WSH) that allows scripts to be run on a computer outside of a webpage. In effect, DOS batch files have returned, except scripts are multi-tasking and have a lot more power.
Welcome to Bucaro TecHelp!

Welcome to Bucaro TecHelp!
Maintain Your Computer and Use it More Effectively
to Design a Web Site and Make Money on the Web

[About BTH]  [User Agreement]  [Privacy Policy]  [Site Map]  [Contact Form]  [Advertise on BTH]  [News Feed]

Google
Web
This Site

WSH to Master Your Computer

Introduction

Windows users interface with their computer through a graphical environment. Even system administrators interface with computers through a graphical environment. But it wasn't always that way. In the early days of computers, system administrators performed their tasks by typing DOS commands. They also wrote scripts, called "batch files", to perform system administration tasks. Even regular users had to know something about DOS in order to use a computer.

Unix and Linux systems also began as command line environments. Even today, Unix and Linux system administrators have a powerful command line environment that gives them capabilities well beyond that of a Windows system administrator.

Whereas Unix and Linux started out as multi-tasking operating systems, Windows started out as a single-task operating system. Although Windows versions 3.1 and earlier appeared to multi-task, they actually ran DOS programs cooperatively. Microsoft was embarassed about the fact that Windows was actually DOS in disguise. They could have developed a multi-tasking DOS, but that was contrary to Microsofts marketing strategy.

Whereas Unix and Linux system administrators could perform powerful tasks through a multi-tasking command-line environment, Windows system administrators had to use a convoluted combination of "Microsoft Management Consoles", Control Panel utilities, and DOS commands to perform tasks.

In the early days, computers had limited speed and capabilities. In order to get programs to run at a reasonable speed, they had to be "compiled" into machine code. Machine code is basically the binary ones and zeros that computers understand.

Today's computers are much more powerful. Much of today's programming is written as scripts. Scripts are text files. When we execute a script, instead of giving the computer Machine code, we pass the script to an "interpreter" program that creates the machine code on the fly. The most common use of scripts is on webpages. The script code can be typed directly into the webpage and then can be executed, or interpreted, any time after the webpage is loaded.

With Windows 2000 and higher, Microsoft included a program called "Windows Scripting Host" (WSH) that allows scripts to be run on a computer outside of a webpage. In effect, DOS batch files have returned, except scripts are multi-tasking and have a lot more power.

Scripts are simply text files. To create them all you need is a simple text editor like Windows Notepad. You have to choose which language you will use to write your script. You can use any language for which an interpreter has been installed. Interpreters for VBScript and Java Script (called JScript on Windows) are installed by default.

VBScript is the easiest language to learn, but it's Microsoft proprietary. If VBScript is all you know, outside of Windows and Internet Explorer you will be programming illiterate. Java Script has a terse syntax similar to C++ (but without the problem causing pointers). People from outside the Windows world prefer to use Java Script because it works virtually everywhere.

If you write in VBScript, you save the file with a ".vbs" extension. If you write in Java Script, you save the file with a ".js" extension. When you double-click on a filename with a .vbs or .js file extension, the WSH creates a "script object" and passes the script to the appropriate interpreter based on the file extension.

In the script code, you can use the methods and properties of the script object. The method you will most commonly use is "CreateObject". For example, you might create a "Network" object. You could then use methods and properties of the Network object to perform administrative tasks across the network. Or you might create a "Shell" object to perform administrative tasks on your local computer.

Computer Sections

RSS Feed RSS Feed

Windows System Administration
Security Risks and Ways to Decrease Vulnerabilities in a 802.11b Wireless Environment
Configure Vista's Data Execution Prevention
Internet Connection Sharing in Windows XP
How to Backup Mails and Address Book of Outlook Express
Windows 2000 Security Overview
Kill The Messenger (Service)
Use the HOSTS File to Block Web Sites
FreeDOS
A Day in the Life of a System Administrator
Microsoft Licensing Explained
Configure Windows Indexing Service for Performance
Configuring Windows as a NTP (Network Time Protocol) Server
Font Basics
Three Important Techniques for Securing a Wireless Network
Defend Your Business with a Firewall
Msconfig - Microsoft's Secret Weapon to Increase Your Computer's Speed
Choosing a Tape Drive
PC Technician Certifications and Professional Organizations
PC Technician's Guide to Providing Telephone Support
PC Technician's Software Copyright Responsibilities
CompTIA A+ Complete Study Guide
Hard Disk Management
Windows Server 2003 Active Directory and Network Infrastructure
The Security and Maintenance of Messages in Outlook Express
Planning a Backup and Restoration of Files for Disaster Recovery
WSH to Master Your Computer
Script to Print a Directory File List
Disable Long Filenames to Improve Window's Performance
Disable Kernal Paging to Speed Up Windows
Script to Display the Processes Running on a Computer
Script to Identify Your Systems HAL
To Protect Your PC Disable the Windows Scripting Host

[Site User Agreement]  [Advertise on This site]  [Search This Site]  [Contact Form]
Copyright©2001-2007 Bucaro TecHelp P.O.Box 18952 Fountain Hills, AZ 85269