User exit scripts
In some situations the standard rule processing options may not be sufficient to meet your requirements. To extend the capabilities of rules, you can create user exit script(s).
在某些情况下标准规则实施选项并不足够满足需求。要扩展规则的能力,你需要创建用户exit脚本。
User exit scripts are specified in the customsettings.ini file, and are processed before and after the CustomSettings.ini rules for each section are processed. User exit scripts have full access to the global variables.
用户exit脚本在customsettings.ini中制定,而在customsettings.ini的sections规则前后实施。用户exit脚本能完全访问全局变量
The user exit script is essentially a function library. You create the functions you need to extend the rule processing functionality and then place them in a user exit script. You then reference the functions within the user exit script from the customsettings.ini file.
用户exit脚本本质上是一个函数库。你可以创建你需要的函数来扩展规则,并把他们放到用户exit脚本中。接下来你能在customsettings.ini中引用这些函数。
For example you may want to use the MAC Address with the colons stripped out as the computer name. A function can be used to “clean” MAC address. The result of the function can then be assigned to the computer name.
例如你想要使用不带冒号的mac地址来作为电脑的名称。一个函数用于删除那些冒号。
The following is an example of a eser exit script that would perform this function.
Function UserExit(sType, sWhen, sDetail, bSkip)UserExit = SuccessfsEnd FunctionFunction CleanMac(sMac)Dim reSet re = new RegExpre.IgnoreCase = truere.Global = truere.Pattern = ":"CleanMac = re.Replace(sMac, "")End FunctionThis function is then referenced from the CustomSettings.ini as follows:ComputerName=#CleanMac("%MacAddress%")#UserExit=UserExit.vbsNote: The user exit script must be placed in the same folder as the CustomSettings.ini file.注意:用户exit脚本必须和customsetting.ini放在同一个目录中提问和评论都可以,用心的回复会被更多人看到 评论发布评论 相关文章
举报文章
请选择举报类型
内容侵权 涉嫌营销 内容抄袭 违法信息 其他补充说明
0/200
上传截图
格式支持JPEG/PNG/JPG,图片不超过1.9M
如有误判或任何疑问,可联系 「小助手微信:cto51cto」申诉及反馈。我知道了