Environment class
This class is referenced in scripts through the object “oEnvironment”.
For example you change the computer name to “Blah” using the following command:
            oEnvironment.Item("ComputerName") = “Blah”
Or if you needed to determine if this is an x86 or x64 then you could query the architecture using the following command:
            oEnvironment.Item("Architecture")
Environment类
这个通过对象"oEnvironment"使用
例如,你想把电脑名称改为"Blah",使用如下命令
           oEnvironment.Item("ComputerName") = “Blah”
或者假设你需要知道电脑的构架是x86或者x64
            oEnvironment.Item("Architecture")
 
Logging class
This class is referenced in scripts through the object “oLogging”.
When creating a informational log entry use the following command:
            oLogging.CreateEntry "Informational message", LogTypeInfo
When creating a error log entry use the following command:
            oLogging.CreateEntry "An error occured“,LogTypeError
Logging类
这个通过对象"oLogging"使用
创建一个通知log:
            oLogging.CreateEntry "Informational message", LogTypeInfo
创建一个错误log
            oLogging.CreateEntry "An error occured“,LogTypeError
 
Utility class
The class is referenced in scripts through the object “oUtility”.
To determine the name of the the current script, use the following command:
            oUtility.ScriptName
To find the location of a file and BDD use the following command will look in a number of locations for it.
            iRetVal = oUtility.FindFile("CustomSettings.ini", sIniFile)
Utility类
这个类通过对象"oUtility"
 
To determine the name of the the current script, use the following command:
  oUtility.ScriptName
 
寻找一个文件的位置
            iRetVal = oUtility.FindFile("CustomSettings.ini", sIniFile)
 
Database class
The class is referenced in scripts through the object “oDatabase”. There is generally no need to use the database class directly. Database lookups can be performed using rule processing. See my rule processing blog for more information.
这个类通过"oDatabase"调用。通常不需要直接使用database类。数据库通常通过使用参数查询。
This is a high level view of the tasks that ZTIUtility.vbs can perform. It is worthwhile taking a good look through the script yourself as there are many hidden gems.
通过 ZTIUtility.vbs可以实现更高级功能。
  • 收藏
  • 评论
  • 举报
提问和评论都可以,用心的回复会被更多人看到 评论
发布评论
相关文章