Skip to content

Instantly share code, notes, and snippets.

@tstolswo
Last active October 9, 2019 13:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tstolswo/d9063c20bbe826c7d0b5406f5d88f01b to your computer and use it in GitHub Desktop.
Save tstolswo/d9063c20bbe826c7d0b5406f5d88f01b to your computer and use it in GitHub Desktop.
'Example 1 - dropdown
'OSD environment objects - referenced in the task sequence to name the computer
<SCRIPT LANGUAGE="VBScript">
SET env = CreateObject("Microsoft.SMS.TSEnvironment")
env("APC") = drop_APC.value
<tr>
<td align="right">Airport Code:</td>
<td><select size="1" name="drop_apc">
<option value="ATL">Atlanta, GA (ATL)</option>
</td>
</tr>
</SCRIPT>
'In the task sequence, the value for this variable would be %APC% - when selected, the value for the selected drop down "Atlanta, GA (ATL)" would equal "ATL" in the task sequence.
'Example 2 - custom text box
<SCRIPT LANGUAGE="VBScript">
SET env = CreateObject("Microsoft.SMS.TSEnvironment")
'OSD environment objects - referenced in the task sequence to name the computer
env("FF") = freeform.value
<tr>
<td align="right">Username/Purpose (Freeform):</td>
<td><input id=freeform type=text maxlength=6></input></td>
</tr>
</SCRIPT>
'In the task sequence, the value for this variable would be %FF%
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment