In this latest version of the Windows Script Host (version 5.6), several features are described:
- Improved parameter handling-it is simpler to process and record command-line arguments. Simplifies the integration of scripts with other command-line scripts and makes it easier to create scripts that can provide help information to users. Please refer to the following table for information about the WSH language features to familiarize yourself with this new feature.
the information to understand |
Please see |
Group the script switches together. |
<runtime> elements |
Defines a named switch for a script. |
<named> elements |
The unnamed switch that defines the script. |
<unnamed> elements |
Make the script self explanatory. |
<example> elements <description> elements |
The Environment (IOW, WSH) that shares the current process with the derived process. |
Exec method |
Access the standard stream programmatically. |
Exec method Wshscriptexec objects |
Access environment variables programmatically. |
Environment Property Wshenvironment objects ExpandEnvironmentStrings method Remove method |
Determines whether the derived script procedure is currently running. |
Status Property (wshscriptexec) |
The StdIn input stream that accesses the derived script procedure. |
StdIn Property (wshscriptexec) |
Accesses the StdOut output stream of the derived script procedure. |
StdOut Property (wshscriptexec) |
Accesses the STDERR output stream of the derived script procedure. |
StdErr Property (wshscriptexec) |
Terminates the derived script process. |
Terminate Method (Wshscriptexec) |
Accesses a named command-line script parameter. |
Wshnamed objects |
Determines whether a particular key value exists in the Wshnamed object. |
Exists method |
Determines the number of switches in the wshnamed or Wshunnamed object. |
Count method |
- can run scripts remotely-You can download scripts to several remote computer systems and run them at the same time. When you run a remote script, you can view its processes. After the script runs, you can make sure it is running correctly or that you can determine the cause of the premature termination. There is a new Send object, the Controller object, that is used to create the remote WSH object. In addition, there is a new object that represents the running instance of the script, the Remote WSH object.
the information to understand |
Please see |
Create a remote scripting Object-Remote WSH interface. |
Wshcontroller objects |
Create a remote scripting object-use the remote WSH interface. |
Createscript method |
Create a remote Script object-Gets the handle. |
Wshremote objects |
Start the remote scripting process. |
Execute method |
Determine whether the remote script is currently running. |
Status Property (Wshremote) |
Determine why the remote script terminated. |
Description Property (Wshremoteerror) |
Identifies the statement in the remote script that caused the script to terminate. |
Line property (Wshremoteerror) |
The error message is accessed after the remote script terminates. |
Wshremoteerror objects |
Identifies the character in the line of code that has the error. |
Character Property |
Identifies the error number that represents the script error. |
Number Property |
Identifies the source of the script error. |
Source Property |
Identifies the source code line that caused the error. |
SourceText Property |
Handles remote object events. |
Start Event End Event Error Event |
- When you start a new procedure, you can treat them as objects -determine the state of the derivation process and access their standard I/O flow.
information to understand |
|
|
exec method |
wshscriptexec object |
|
status properties (wshscriptexec) |
access standard I/O Flow. |
stdout properties (wshscriptexec) |
|
stdin properties (wshscriptexec) |
&NBSP; |
stderr Property (wshscriptexec) |
- can access the current working directory - You can determine/modify the current working directory of the active process.
the information to understand |
Please see |
Access information for the Active Directory. |
CurrentDirectory Property |
- security issues specific to the script are described -a new security model makes it more secure to distribute and run scripts.
the information to understand |
Please see |
Script signing and verification. |
Security and Windows Script Host |