Everything posted by ThinkRSX
I was able to resolve the issue by placing the Language Value drop down on a separate page (may not have been necessary) and removing the "onChange="RunScript" from the drop down box HTML. I must have missed this when I borrowed it from the HTA Helpomatic tool.
I think I've almost gotten it. Still getting an "Error 1024 = Expected Statement. Here's the VBS Option Explicit ''''''''''''''''''''''''''''''''''''' ' Initialize ComputerName ' Function InitializeComputerName If oUtility.ComputerName = "" Then If oEnvironment.Item("HostName") <> "" Then OSDComputerName.Value = oEnvironment.Item("HostName") Else OSDComputerName.Value = oENV("ComputerName") End If Else OSDComputerName.Value = oEnvironment.Item("OSDComputerName") End If End Function ''''''''''''''''''''''''''''''''''''' ' Validate ComputerName ' Function ValidateComputerName ' Check Warnings ParseAllWarningLabels If Len(OSDComputerName.value) > 15 then InvalidChar.style.display = "none" TooLong.style.display = "inline" ValidateComputerName = false ButtonNext.disabled = true ElseIf IsValidComputerName ( OSDComputerName.Value ) then ValidateComputerName = TRUE InvalidChar.style.display = "none" TooLong.style.display = "none" Else InvalidChar.style.display = "inline" TooLong.style.display = "none" ValidateComputerName = false ButtonNext.disabled = true End if End Function ''''''''''''''''''''''''''''''''''''' ' Initialize LanguageValue ' Function InitializeLanguageValue For Each oSelection in languageValue.Options If oSelection.Selected Then oEnvironment("languageValue") = oSelection.id End If End Function And the HTML: <Wizard> <Global> </Global> <Pane id="ComputerName" title="Computer Name"> <Body><![CDATA[ <H1>Configure the computer name.</H1> <span style="width: 95%;"> <p>Choose a name for your PC that will help you identify it on your network, if you have one. Each computer on your network must have a unique name.</p> <P>You can name your computer based on its owner or location, for example "DAVID" or "XYZLAB123." In order for your computer to appear on a network, its name cannot be longer than 15 characters or contain any spaces or characters aside from the numbers 0-9, the letters A-Z and a-z, and hyphens.</P> <p><span class="Larger">Computer n<u class=larger>a</u>me:</span> <input type=text id="OSDComputerName" name=OSDComputerName size=15 language=vbscript onpropertychange=ValidateComputerName AccessKey=A /></p> <p> <label class=ErrMsg for=OSDComputerName>* Required (MISSING)</label> <label class=ErrMsg id=InvalidChar>Letters, Numbers & Dashes only!</label> <label class=ErrMsg id=TooLong>Maximum of 15 characters!</label> </p> <H1>Select a language</H1> <span style="width: 95%;"> <p>Select a primary language.</p> <select size="1" id="languageValue" name=languageValue onChange="RunScript"> <option value="1" id="English">English</option> <option value="2" id="French">French</option> <option value="3" id="Spanish">Spanish</option> </select> <!-- Computer Description Format --> <!-- <p>You can also give your computer a friendly description. Unlike the computer name, the computer description may contain spaces and other special characters. "Frank Kim's Test machine" and "E-Mail Server #23, Miami Regional Office, Rm. 2305." are examples of computer descriptions.</p> <p><span class="Larger">Computer <u class=larger>d</u>escription:</span><br/> <input type=text id="Description" name=ComputerDescription size=60 language=vbscript onpropertychange=ValidateComputerName AccessKey=d /></p> --> </span> ]]></Body> <Condition><![CDATA[UCase(Property("SkipComputerName"))<>"YES" and Property("DeploymentType")<>"REPLACE" and Property("DeploymentType")<>"CUSTOM" ]]></Condition> <Initialization><![CDATA[InitializeComputerName]]></Initialization> <Validation><![CDATA[ValidateComputerName]]></Validation> </Pane> </Wizard>
This is my first time posting, however, I've spent a lot of time reading the vast amounts of knowledge on this site. I'm relatively new to OSD through SCCM, however, I've spent the past month reading and testing so that I can implement the technology for my employer. I have my CM12 w/MDT 2013 integrated task sequence setup and working well. In it's current form, there are two Collection Variables assigned to the "Unknown Computers" collection. The variables are "OSDComputerName" and "languageValue". What I was hoping to do was eliminate the need for those Collection Variables by enabling the Prestart command and calling ZTIMediahook.wsf in my MDT Boot Disk. Out of the box, this gives you a prompt for OSDComputername, now all I need to do is add a dropdown box containing my languages. I've multiple attempts at trying to achieve this. I've tried modifying Wizard.hta with PrimalScript and the MDT Wizard Studio but had no success. Since I'm not very strong in writing script, I've borrowed code from the various FrontEnds out and tools like the HTA Helpomatic tried plugging them in. Hopefully someone out there can assist me with this. I need to modify Wizard.hta to add a dropdown list, preferably on the same page as Computer Name, which lists "English, French, Spanish, Multi" and sets the custom "languageValue" variable equal to that box. Any assistace would be greatly appreciated. Thanks!