如何在MDT/BDD中写一个自定义的脚本(4)
版权声明:原创作品,允许转载,转载时请务必以超链接形式标明文章 原始出处 、作者信息和本声明。否则将追究法律责任。http://xmuxsp.blog.51cto.com/144876/74982 |
第一次翻译小文章,还请大家多多包涵。
最后一篇就贴一个写好的模板供大家参考~
Template
Use the following template to create your own custom scripts.
<job id="Z-Sample">
<script language="VBScript" src="ZTIUtility.vbs"/> <script language="VBScript"> ' //*************************************************************************** ' // ***** Script Header ***** ' // ' // Solution: Solution Accelerator for Business Desktop Deployment ' // File: Z-Sample.wsf ' // ' // Purpose: Template ' // ' // Usage: cscript Z-Sample.wsf [/debug:true] ' // ' // Customer Build Version: 1.0.0 ' // Customer Script Version: 1.0.0 ' // Customer History: ' // ' // ***** End Header ***** ' //*************************************************************************** '//---------------------------------------------------------------------------- '// '// Global constant and variable declarations '// '//---------------------------------------------------------------------------- Option Explicit
Dim iRetVal
'//---------------------------------------------------------------------------- '// End declarations '//---------------------------------------------------------------------------- '//---------------------------------------------------------------------------- '// Main routine '//---------------------------------------------------------------------------- On Error Resume Next iRetVal = ZTIProcess ProcessResults iRetVal On Error Goto 0 '//--------------------------------------------------------------------------- '// '// Function: ZTIProcess() '// '// Input: None '// '// Return: Success - 0 '// Failure - non-zero '// '// Purpose: Perform main ZTI processing '// '//--------------------------------------------------------------------------- Function ZTIProcess() iRetVal = Success
ZTIProcess = iRetval
'!!!!!!!!!!! INSERT YOUR CODE HERE !!!!!!!!!!!!
End Function
</script>
</job> 有人问Bent到哪里去找那些写好的功能:
Great Stuff - Is there any way I can find all of the oEnvironment Items that are available. I am trying to find the ALLUSERSPROFILE environment variable etc.
回答:
If you have a look in the \MININT\SMSOSD\OSDLOGS folder you will find a file called variables.dat. This contains all of the environment variables and there values.
It is in an XML format so I find it easiest to rename it variables.xml and open it with IE.
Thanks, 本文出自 51CTO.COM技术博客 |


xmuxsp
博客统计信息
热门文章
最新评论
友情链接