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
收藏
推荐专栏更多
猜你喜欢
我的友情链接 Visual Studio 2010更改颜色背景的方法 iptables交互配置脚本【Linux运维之道之脚本案例】 Shell脚本中循环语句for,while,until用法 Shell脚本语法-- if/then/elif/else/fi 自动化运维工具Ansible实战(五)Playbooks剧本使用 实战Nginx与PHP(FastCGI)的安装、配置与优化 linux 自动执行 crontab学习笔记 Linux中变量$#,$@,$0,$1,$2,$*,$$,$?的含义 linux shell脚本快速提升的秘诀 101个shell脚本 windows通过bat脚本设置服务开机启动 API网关如何实现对服务下线实时感知 浅谈ACL(访问控制列表) Confluence 未授权 RCE (CVE-2019-3396) 漏洞分析 亿级日搜索量的美团如何构建高效的搜索系统? 玩转KVM:怎么追查KVM故障 mysql5.7.25主从同步图解(主:CentOS7.5,从win10) springboot2+exporter+prometheus+grafana搭建监控体系 使用Alpine Linux和Oracle jre6构建Tomcat6镜像及应用容器化
扫一扫,领取大礼包
转载于:https://blog.51cto.com/xmuxsp/74506
Ctrl+Enter 发布
发布
取消