Hi Tregelen,
Yes ,i have created a package with no program and referenced in the Run Command Line step.
Yes ,i have added HTA support into my boot image.
Here is the script,
==================================================================================================
<script type="text/vbscript"> Option Explicit On Error Resume Next 'Declare Variables Dim objWMI, shell, objChassis, objSerial,sComputerType,sSerial,sComputerName, objInstance, TSEnvironment,env Set objWMI = GetObject("WinMgmts:") set shell = CreateObject("wscript.shell") ' Identify Chassis Type Set objChassis = objWMI.InstancesOf("Win32_SystemEnclosure") For Each objInstance In objChassis Select Case objInstance.ChassisTypes(0) Case "8", "9", "10", "12", "14", "18", "21" sComputerType = "L" Case "3", "4", "5", "6", "7", "15" sComputerType = "D" Case "23" sComputerType = "D" Case "1", "2" sComputerType = "V" Case Else sComputerType = "D" End Select Next 'Gather Serial Number Set objSerial = objWMI.InstancesOf("Win32_BIOS") For Each objInstance In objSerial sSerial = objInstance.SerialNumber Next 'Build the OSDComputerName string sComputerName = "W7" & sComputerType & sSerial ' Declare SCCM Task Sequence Variables and Then Set The Values Set TSEnvironment = CreateObject("Microsoft.SMS.TSEnvironment") TSEnvironment("OSDComputerName") = sComputerName TSEnvironment("Type") = sComputerType 'To test the OSDComputerName value remove the ' from the line below. 'Wscript.Echo sComputerName '******************************************************************************' ' Size & Positioning ' '******************************************************************************' winWidth=300 winHeight=400 window.resizeto winWidth,winHeight centerX=(screen.width-winWidth)/2 centerY=(screen.height-winHeight)/2 window.moveto centerX,centerY posX=0 posY=0 move=0 '******************************************************************************' ' Function to Close HTA ' '******************************************************************************' Function closeHTA() self.close End Function '******************************************************************************' ' Validate Variables ' '******************************************************************************' Sub runValidation If ComputerName.value = "" Then msgbox("Please Enter a Computer Name") ElseIf Username.value = "" Then msgbox("Please Enter a Username") ElseIf EmployeeID.value = "" Then msgbox("Please Enter a EmployeeID") Else runInstall End If End Sub '******************************************************************************' ' Configure Task Sequence Variables ' '******************************************************************************' Sub runInstall 'msgbox("Test: " & varPanel)' '************************************************************' ' Computer Name ' '************************************************************' TSEnvironment("OSDComputerName") = sComputerName 'msgbox("ComputerName TSValue: " & TSEnvironment("OSDCOMPUTERNAME"))' '************************************************************' ' AD OU ' '************************************************************' If ADOU.value = "1" Then TSEnvironment("swn_ADOU") = "(ABU)" 'msgbox("AD OU TSValue: " & TSEnvironment("swn_ADOU"))' ElseIf ADOU.value = "2" Then TSEnvironment("swn_ADOU") = "(DBI)" 'msgbox("AD OU TSValue: " & TSEnvironment("swn_ADOU"))' ElseIf ADOU.value = "3" Then TSEnvironment("swn_ADOU") = "(JEB)" 'msgbox("AD OU TSValue: " & TSEnvironment("swn_ADOU"))' End If '************************************************************' ' Set Primary User ' '************************************************************' TSEnvironment("SMSTSUdaUsers") = Username.value '************************************************************' ' Employee ID ' '************************************************************' TSEnvironment("SMSTSUdaUsers") = EmployeeID.value '************************************************************' closeHTA() End Sub
========================================================================