What Is WSH?

Google

The Microsoft Windows Script Host (WSH) is a tool that will allow you to run Visual Basic Scripting Edition and JScript natively within the base Operating System, either on Windows 95 or Windows NT 4.0. Using the scripting languages you already know you can now write script to automate common tasks, and to create powerful macros and logon scripts.
For example, one user may want to tweak the registry to add new commands to a context menu; another may want a tool that reads a database of invoices and convert all the currency values to euro. Yet another may desire a script-based task scheduler that�s more flexible than the AT program supplied with NT4. Others may want to send e-mails, arrange logon scripts, set-up new user accounts in an automatic way, or simply copy or move files without dropping down to the text-mode command prompt.


For this neglected category of user, WSH is manna from heaven. WSH is a script-based environment that lets you use any script language compatible with the Windows Scripting engine (formerly known as the ActiveX Scripting engine) to write modern batch files. WSH is available as an accessory program with both Windows 98 and 2000 (make sure you check the right option before installation). You can also get WSH as an add-on for Windows 95 and NT4.


Script files offer two major advantages over the MS-DOS batch file: they are written using a far richer language, and they can access COM automation objects. The former guarantees readability, easy maintenance and the ability to leverage your existing knowledge of scripting languages. The second point opens up a virtually unlimited world of possibilities.


This means that any element in the Windows environment becomes manageable through WSH scripts once its functionality has been encapsulated as a COM automation object. This means you can access existing object models, such as ADO, Word, Excel, Shell, and of course the WSH object model itself. It also means you can access new object models you�ve created yourself. Writing a COM object which can be scripted from WSH doesn�t involve anything special: just create a standard Automation COM object using Visual Basic, MFC, ATL, Visual J++ or whatever takes your fancy.

WSH is implemented by two executables called wscript.exe and cscript.exe. The former is a Win32 executable located in the Windows directory. The latter is a Win32 console application that can be found in the \Windows\Command folder. Both host the Windows Scripting engine and are capable of understanding and interpreting VBScript and JScript code.
Let's say that you want to know how to uninstall the Windows Scripting Host so that worms, such as VBS.LoveLetter, cannot use it to spread infection on your computer. The Microsoft Windows Scripting Host enables you to run Visual Basic Scripting and JScript within Windows. Most programs do not use this scripting. Because several worms have made use of this scripting, which is similar to a macro, you may want to remove it if it is not needed; this will prevent the spread of infection by worms which make use of it.

Hosted by www.Geocities.ws

1