What's New In WSH 5.6
Several areas of functionality have been addressed in this latest version of the Windows Script Host (version 5.6).
Improved Argument Handling
Handling and documenting command line arguments is simpler. The process of integrating your scripts with other command line scripts has been simplified, and it is easier to create scripts that can supply the user with help information. Refer to the following table for information on the WSH language features that connect you to this new functionality.
To Learn About
See
Grouping your script's switches together.
Defining your script's named switches.
Defining your script's unnamed switches.
Making your script self-documenting.
Sharing the environment of the current process (IOW, WSH) with a spawned process.
Accessing the standard streams programmatically.
Accessing environment variables programmatically.
Determining whether a spawned script process is currently running.
Accessing the spawned script process's StdIn input stream.
Accessing the spawned script process's StdOut output stream.
Accessing the spawned script process' StdErr output stream.
Terminating a spawned script process.
Accessing the named command-line script arguments.
Determining whether a specific key value exists in the WshNamed object.
Determining the number of switches in the WshNamed or WshUnnamed objects.
Running Scripts Remotely
You can load scripts onto several remote computer systems and start them all running simultaneously. While a remote script is running, you can check its progress. After it has finished, you can ensure that it ran correctly or determine the cause of its premature termination. There is a new dispatch object used to create remote WSH objects — the Controller object. In addition, there is a new object that represents an instance of a running script — the Remote WSH object.
To Learn About
See
Creating a remote script object — the remote WSH interface.
Creating a remote script object — using remote WSH interface.
Creating a remote script object — getting a handle.
Starting a remote script process.
Determining whether a remote script is currently running.
Determining why a remote script terminated.
Identifying which statement in your remote script caused it to terminate.
Accessing error information after a remote script terminates.
Identifying the character in the line of code that contained the error.
Identifying the error number representing a script error.
Identifying the source of the script error.
Identifying the line of source code that caused an error.
Handling remote object events.
Treating New Process as Objects
You determine the status of spawned processes and access their standard I/O streams.
To Learn About
See
Spawning a process.
Accessing the object that represents running processes.
Accessing process status information.
Accessing the standard I/O streams.
Accessing the Current Working Directory
You can determine/modify the active process's current working directory.
To Learn About
See
Accessing the active directory information.
Security Issues
A new security model makes distributing and running scripts safer.
To Learn About
See
Script signing and verification.