Karthik2811 Posted September 6, 2016 Report post Posted September 6, 2016 Hi Guys, My environment is not integrated with MDT,I created a HTA file where tech can select the list of OU's(I have more than 100 OU's) during the OSD, I have added the hta file to run after the Disk partitioned . While testing i am not able to see the Front end ,i can see the log files(attached) Please let me know if any thing need to be setup in additional.Also help me in adding Computer description in the same hta file. smsts.log Quote Share this post Link to post Share on other sites More sharing options...
tregelen Posted September 6, 2016 Report post Posted September 6, 2016 Have you created a package with no program for your HTA and are referencing that in your 'Run Command Line' step? Have you added HTA support into your boot image? I remember having issues with loading a HTA years ago when 2012 first came out where I had to copy the file locally first and then reference that full path. Quote Share this post Link to post Share on other sites More sharing options...
Karthik2811 Posted September 7, 2016 Report post Posted September 7, 2016 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 ExplicitOn Error Resume Next'Declare VariablesDim objWMI, shell, objChassis, objSerial,sComputerType,sSerial,sComputerName, objInstance, TSEnvironment,envSet objWMI = GetObject("WinMgmts:")set shell = CreateObject("wscript.shell")' Identify Chassis TypeSet 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 SelectNext'Gather Serial NumberSet objSerial = objWMI.InstancesOf("Win32_BIOS")For Each objInstance In objSerial sSerial = objInstance.SerialNumberNext'Build the OSDComputerName stringsComputerName = "W7" & sComputerType & sSerial' Declare SCCM Task Sequence Variables and Then Set The ValuesSet TSEnvironment = CreateObject("Microsoft.SMS.TSEnvironment")TSEnvironment("OSDComputerName") = sComputerNameTSEnvironment("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 ======================================================================== Quote Share this post Link to post Share on other sites More sharing options...
tregelen Posted September 7, 2016 Report post Posted September 7, 2016 Try copying the file locally first and then reference the full path in the command line. You can use the step 'Download Package Content' to copy the files and assign that path to a variable and then reference that in the 'Run Command Line' step. 1 Quote Share this post Link to post Share on other sites More sharing options...
Karthik2811 Posted September 11, 2016 Report post Posted September 11, 2016 It worked ,Thanks. HTA is now displaying now during the OSD. How do we hide the Task Sequence until we complete the HTA? I have error in the script .Can anyone assist please ? Quote Share this post Link to post Share on other sites More sharing options...
tregelen Posted September 11, 2016 Report post Posted September 11, 2016 There is a handy post regarding hiding the TS on this forum, located here As for the error, what messages are you getting? Quote Share this post Link to post Share on other sites More sharing options...