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

第一次翻译小文章,还请大家多多包涵。
最后一篇就贴一个写好的模板供大家参考~
 
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,
分享至
一键收藏,随时查看,分享好友!
0人
了这篇文章
类别:未分类┆阅读( 0)┆评论( 0) ┆ 返回博主首页┆ 返回博客首页
上一篇 如何在MDT/BDD中写一个自定义的脚本(3) 下一篇 深入BDD规则实施(rule processing)(1)

职位推荐

  • Linux系统运维工程师
  • 高级系统运维工程师
  • 系统运维工程师
  • 运维工程师
  • 运维工程师
  • 系统工程师
  • 网络运维工程师
  • linux运维工程师
  • 高级运维工程师
  • 运维工程师

文章评论

 
 

发表评论            

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

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

内  容:

同时赞一个

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

你可能感兴趣的:(职场,休闲,bdd,MDT,系统部署)