Jump to content


  • 0
Karthik2811

HTA does not appear during the OSD

Question

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

post-34027-0-91773300-1473167635.jpg

Share this post


Link to post
Share on other sites

5 answers to this question

Recommended Posts

  • 0

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.

Share this post


Link to post
Share on other sites

  • 0

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

 

========================================================================

Share this post


Link to post
Share on other sites

  • 0

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.

  • Like 1

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...


×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.