You can develop new scripts for use in MDT deployments. These scripts should be in the form of .vbs or .wsf files. For examples of scripts that the Deployment Workbench uses, open the installation path of the deployment share, and then open the Scripts folder.

Note   Microsoft does not support customized and custom scripts.

Before describing how to create a script, it is best to review how the scripts included with MDT are constructed. The standard MDT script is a .wsf file, which allows references to be made to functions that are contained in other scripts. MDT scripts leverage this functionality by referencing the ZTIUtility.vbs script and the ZTIDataAccess.vbs script. The ZTIUtility.vbs script is used to initialize the MDT environment and setup classes. The ZTIDataAccess.vbs script includes the common routines for database access, including connecting to and querying databases, and provides a web service interface.

The scripts define several standard objects that need not be declared in the script:

·     oFSO. File System Object

·     oShell. WScript Shell object

·     oEnv. Process Environment object

·     oNetwork. WScript Network object

The following classes are defined that perform several standard tasks:

·     Environment. Configures environment variables gathered through WMI and MDT rule processing, allowing for direct reference from the script, and is defined in ZTIUtility.vbs as described in Environment Class.

·     Logging. Provides the logging functionality that all MDT scripts use, creating a single log file for each script and a consolidated log file of all scripts and is defined in ZTIUtility.vbs as described in Logging Class.

·     Utility. Provides general utility functionality and is defined in ZTIUtility.vbs as described in Utility Class.

·     Database. Provide access to databases and is defined in ZTIDataAccess.vbs as described in Database Class. The Database class:

·     Is used by ZTIGather.wsf when processing database rules from the CustomSettings.ini or BootStrap.ini files

·     Can be used to access databases in scripts instead of configuring the CustomSettings.ini or BootStrap.ini files; you can specify the parameters for accessing the database in the scripts

·     WebService. Provides access to web services and is defined in ZTIDataAccess.vbs as described in WebService Class. The WebService class:

·     Is used by ZTIGather.wsf when processing web service rules from the CustomSettings.ini or BootStrap.ini files

·     Can be used to access web services in scripts instead of configuring the CustomSettings.ini or BootStrap.ini files; you can specify the parameters for accessing the web services in the scripts

Related Topics

Creating Custom Scripts for MDT
Environment Class
Logging Class
Utility Class
Database Class
WebService Class