application , networking , web-services

OS Jobs Scripts Can Do

October 14, 2009

Windows Script Host provides objects for manipulation of your scripts. Here are some of the tasks that these objects and services can do for you:

  1. Map network drives
  2. Connect to printers
  3. Modify environment variables e.g. Temp
  4. Run basic functions such as CreateObject and GetObject
  5. Print a message to a Message Box on screen
  6. Modify keys and values in the registry

The big picture of the scripting model

There are three layers in the script model.

  1. Top  Layer:  ActiveX, COM, DLL’s (You have to know your boundaries so I won’t go any further into ActiveX)
  2. Middle Layer:  Script Engines VBScript, and JSCript   (Equivalent of .bat files)
  3. Bottom Layer: WSH with :CSCript, WSCript, NWSCript also IE Explorer  (Equivalent of DOS or CMD.exe)

So what is a Script?

A Windows 2000 script is a program written in a special language called JScript and VBScript.  (If you prefer you could use Perl or Rexx)  These scripting languages are designed to create short applications that provide quick solutions to network problems.

Different Types of Scripts

  • vbs – VBScript files WSH
  • js – JScript files for WSH
  • wsf – Project file, container object for WSH files
  • bat – DOS batch files
  • html – Familiar ‘markup’ language.
  • asp – Active Server Pages for webs

What is WSH ? (Windows Scripting Host)

  • Windows Scripting Host is aptly named, think of it as providing an environment for hosting scripts. When a logon script arrives from the server, WSH makes sure objects and services are available for the script.  It also check security and passes the script to the appropriate script engine. Example engine: ActiveX.
  • WSH is ideal for non-interactive scripting jobs, such as logon configuration, administrative scripting, or machine automation

https://www.bestitdocuments.com/