如何在MDT/BDD中写一个自定义的脚本(2)

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可以实现更高级功能。
分享至
一键收藏,随时查看,分享好友!
0人
了这篇文章
类别:未分类┆阅读( 0)┆评论( 0) ┆ 返回博主首页┆ 返回博客首页
上一篇 如何在MDT/BDD中写一个自定义的脚本(1) 下一篇 如何在MDT/BDD中写一个自定义的脚本(3)

相关文章

  • WPF/E CTP Quick Start - 第十部分:脚本和..

职位推荐

  • Linux系统运维工程师
  • CDN运维工程师
  • 运维工程师
  • 广告设计
  • 网络工程师

文章评论

 
 

发表评论            

昵  称:
登录  快速注册
验证码:

点击图片可刷新验证码请点击后输入验证码博客过2级,无需填写验证码

内  容:

同时赞一个

每日博报 精彩不止一点关闭

你可能感兴趣的:(职场,脚本,休闲,bdd,MDT)