Windows脚本文件(WSF)的使用与转换
在脚本编程领域,Windows脚本文件(WSF)是一种强大的工具,它在传递参数、脚本包装和转换等方面具有显著优势。下面将详细介绍WSF的相关知识和操作方法。
1. 脚本资源与帮助信息
在脚本中,我们可以使用资源标签来存储脚本版本和联系信息。例如:
<job>
<resource id="strAbout">
version 1.0
JDH Information Technology Solutions
http://www.jdhitsolutions.com
</resource>
...
<script language="VBScript">
'if user passes version as the first parameter then display version information
'stored in the resource tag
If InStr(Lcase(wscript.arguments.item(0)), "version") then
MsgBox getResource("strAbout")
WScript.Quit
End if
'script continues
</script>
</job>
在这个例子中,如果用户将“version”作为第一个参数传递,脚本将显示存储在资源标签中的版本信息。
同时,资源ID是区分大小写的,如果脚本运行失败,需要比较资源ID
超级会员免费看
订阅专栏 解锁全文
7

被折叠的 条评论
为什么被折叠?



