Attention – this Options Chooser has been superseded by Nick’s “version 3” which can be reviewed at https://t3chn1ck.wordpress.com/2013/06/06/osd-options-chooser-v3/
The following custom HTA can be used during OSD when imaging computers with SCCM 2007. It has been updated from my previous version and will do the following:
- Section 1 – for the name to be give to the computer.
- Section 2 – for the technician imaging the computer
- Section 3 – for a ticket number
- Section 4 – for adding a user to the local admins group
- Section 5 – for selecting the computer’s time zone
Note: additional time zones can be found at http://technet.microsoft.com/en-us/library/cc749073(WS.10).aspx - Section 6 – for selecting a flavor of Acrobat as post installed software
- Section 7 – for selecting other software to be installed
- Note that on the first three sections, if the option is left empty, then after clicking finish a circular prompt is done until a value is added. Also, they set custom Task Sequence variables which you will need to use later in your process, such as in custom logging or setting a registry key for your organization, etc.
Also, remember to enable HTA support in your boot images – https://t3chn1ck.wordpress.com/2010/01/28/hta-support-in-sccm-boot-images/
<!-- ----------------------------------------------------------- Created by Nick Moseley https://t3chn1ck.wordpress.com For this script to function, HTA support must have been added into the boot image See for more information - http://technet.microsoft.com/en-us/library/dd799244.aspx --------------------------------------------------------------- --> OSD Options Chooser <script type="text/vbscript" language="vbscript">// <![CDATA[ window.resizeTo 375,700 window.moveTo 5,5 Sub FinishClickTasks 'On Error Resume Next Dim oTaskSequence, oShell, sComputerName, bErrComputerName, bErrTechName, bErrTicketNumber, sCurPath, sKioskName Set oTaskSequence = CreateObject ("Microsoft.SMS.TSEnvironment") Set oShell = CreateObject ("WScript.Shell") sComputerName = UCase(ComputerName.Value) ' Set values inputed from HTA dialog If sComputerName = "" Then oTaskSequence ("OSDComputerName") = "null" Else oTaskSequence ("OSDComputerName") = sComputerName End If If TechName.Value = "" Then oTaskSequence ("OSDTechName") = "null" Else oTaskSequence ("OSDTechName") = TechName.Value End If If TicketNumber.Value = "" Then oTaskSequence ("OSDTicketNumber") = "null" Else oTaskSequence ("OSDTicketNumber") = TicketNumber.Value End If ' Check for errors with the computer name or technician name Dim sTSVar1, sTSVar2, sTSVar3, bNoErr sTSVar1 = oTaskSequence("OSDComputerName") sTSVar2 = oTaskSequence("OSDTechName") sTSVar3 = oTaskSequence("OSDTicketNumber") bNoErr = False If sTSVar1 = "null" Then bErrComputerName = True End If If sTSVar2 = "null" Then bErrTechName = True End If If sTSVar3 = "null" Then bErrTicketNumber = True End If ' Display error message If bErrComputerName And bErrTechName And bErrTicketNumber Then MsgBox "Error: Computer name, technician name, and Incident or Service Request number cannot be blank.", vbCritical, "Error" ElseIf bErrComputerName And bErrTechName Then MsgBox "Error: Computer name and technician name cannot be blank.", vbCritical, "Error" ElseIf bErrComputerName And bErrTicketNumber Then MsgBox "Error: Computer name and Incident or Service Request number cannot be blank.", vbCritical, "Error" ElseIf bErrTechName And bErrTicketNumber Then MsgBox "Error: Technician name and Incident or Service Request number cannot be blank.", vbCritical, "Error" ElseIf bErrComputerName Then MsgBox "Error: Computer name cannot be blank.", vbCritical, "Error" ElseIf bErrTechName Then MsgBox "Error: Technician name cannot be blank.", vbCritical, "Error" ElseIf bErrTicketNumber Then MsgBox "Error: Incident or Service Request number cannot be blank.", vbCritical, "Error" End If ' Loop until end-user enters a value Do If bErrComputerName Then sComputerName = InputBox ("Please enter a COMPUTER name to continue", "", , 30,30) If sComputerName <> "" Then oTaskSequence ("OSDComputerName") = sComputerName bErrComputerName = False End If ElseIf bErrTechName Then sTechName = InputBox ("Please enter a TECHNICIAN name to continue.", "", , 30,30) If sTechName <> "" Then oTaskSequence ("OSDTechName") = sTechName bErrTechName = False End If ElseIf bErrTicketNumber Then sTicketNumber = InputBox ("Please enter an Incident or Service Request number to continue.", "", , 30,30) If sTicketNumber <> "" Then oTaskSequence ("OSDTicketNumber") = sTicketNumber bErrTicketNumber = False End If Else bNoErr = True End If Loop Until bNoErr ' Set local time zone For Each oTimeZone In TimeZone If oTimeZone.Checked Then oTaskSequence("OSDTimeZone") = oTimeZone.value End If Next ' UserName to add as a local administrator If UserName.Value <> "" Then oTaskSequence ("OSDAdminUser") = UserName.Value End If ' Applications to install ' Acrobat If Acrobat(1).checked Then oTaskSequence ("OSDAcrobat10") = "standard" ElseIf Acrobat(2).checked Then oTaskSequence ("OSDAcrobat10") = "professional" End If ' Other Apps If ProjectStd2010.checked Then oTaskSequence ("OSDProjStd2010") = "true" End If If VisioStd2010.checked Then oTaskSequence ("OSDVisioStd2010") = "true" End If If StreetsTrips2010.checked Then oTaskSequence ("OSDStreetsTrips2010") = "true" End If window.close End Sub // ]]></script> <!-- HTML goes here --> Computer Name <input id="ComputerName" type="text" name="ComputerName" size="45" /> Technician Name Imaging Computer <input id="TechName" type="text" name="TechName" size="45" /> Incident or Request Number <input id="TicketNumber" type="text" name="TicketNumber" size="45" /> Username to add to Local Admin Group (if applicable) <input id="UserName" type="text" name="UserName" size="45" /> <b>Select Time Zone For the Computer</b> <input type="radio" name="TimeZone" value="Pacific Standard Time" />PST (US West Coast) <input type="radio" name="TimeZone" value="US Mountain Standard Time" />AZT (US Arizona) <input type="radio" name="TimeZone" value="Mountain Standard Time" />MST (US Mountain) <input type="radio" name="TimeZone" value="Central Standard Time" />CST (US Central) <input type="radio" name="TimeZone" value="Eastern Standard Time" />EST (US East Coast) <b>Select Post Installed Applications</b> <input type="radio" name="Acrobat" /> Do not install Acrobat <input type="radio" name="Acrobat" /> Adobe Acrobat Standard X <input type="radio" name="Acrobat" /> Adobe Acrobat Professional X <input type="checkbox" name="ProjectStd2010" /> Microsoft Project Standard 2010 <input type="checkbox" name="StreetsTrips2010" /> Microsoft Streets and Trips 2010 <input type="checkbox" name="VisioStd2010" /> Microsoft Visio Standard 2010 <button accesskey="N" id="buttonFinish" onclick="FinishClickTasks" type="submit">Finish</button> Created by Nick Moseley, https://t3chn1ck.wordpress.com
Hey,
This is wonderful, thanks a lot,
i’ve changed it a bit if you’re interested in my version which let’s the user choose between OS refresh, bare metal and a confirmation before formatting (if bare metal is chosen), a placeholder for company logo and cancel button,
https://docs.google.com/document/pub?id=1Uq3SwHMKS9Betsyn1X6F_0PvXu7t2TFBjv56aGsx3No
Thanks! By the way, I like your gravatar name!!