Jump to content


kenkarniff

Established Members
  • Posts

    2
  • Joined

  • Last visited

kenkarniff's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. Hello, its mainly just a script for making sure the computername is 14 chars... Might be redundant to use, but we had it since before using OSD++. Dim sNewComputerName, oTaskSequence, sOSDComputerName ' Populate Task Sequence option values Set oTaskSequence = CreateObject("Microsoft.SMS.TSEnvironment") ' Fetch Task Sequence variables sOSDComputerName = oTaskSequence("OSDComputerName") ' Truncate sNewComputerName = lcase(left(sOSDComputerName,14)) ' Send the variable to the Task Sequence oTaskSequence("OSDComputerName") = sNewComputerName wscript.echo "Set Task Sequence variable OSDComputerName to " & sNewComputerName
  2. This may be obsolete for the topic starter, but I ran into the same question and thought i could contribute. To get value from a variable, type it with % around. Listbox options are fetched by adding the Option alt appended to the variable. This worked for me with Windows 7 install. I put a empty "Create Task Sequence Variable" for OSDComputerName before So in you case the XML would look like this (with some cleanup): <?xml version="1.0" encoding="utf-8"?> <OSDPlus> <GetWmi namespace="root\cimv2" class="Win32_BIOS" property="SerialNumber" varname="SN" /> <GetUser title="Computer Name Selection" subtitle="Please Select Your Build Location" icon="74"> <Listbox prompt="Location" icon="45" varname="Location"> <Option alt1="MNEP-%SN%">Minnesota Eden Prairie</Option> <Option alt1="MNWB-%SN%">Minnesota Woodbury</Option> </Listbox> </GetUser> <PutTSVar varname="Locationalt1" tsvar="OSDComputerName"/> </OSDPlus> I put this between "Partition Disk" and "Apply Operating System" in my Task Sequence.
×
×
  • 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.