I'm new into HTA/vbscript. I did created this HTA vbscript file. The only thing i'm trying to find out is how to pass the values from the textbox and dropdownlist with the button so that the TS can continue with deployment.
The HTA is asking for a computername and OU.
<html>
<head>
<title>Windows 8 - Bare-Metal deployment</title>
<HTA:APPLICATION
ID="objTest"
APPLICATIONNAME="Bare-Metal deployment"
SCROLL="yes"
SINGLEINSTANCE="yes"
>
</head>
<SCRIPT LANGUAGE="VBScript">
'Hide TS progress windows
Dim oTSProgressUI
Set oTSProgressUI = Wscript.CreateObject("Microsoft.SMS.TSProgressUI")
oTSProgressUI.CloseProgressDialog()
'Variablen
Dim sComputerName, oTaskSequenceA, oTaskSequenceB, sOuName
'SMS Objects
Set oTaskSequenceA = CreateObject ("Microsoft.SMS.TSEnvironment")
Set oTaskSequenceB = CreateObject ("Microsoft.SMS.TSEnvironment")
'Textbox computername
Sub CompNameTextbox
oTaskSequenceA("OSDComputername") = UCase(CompNameTextbox.Value)
End sub
'Dropdownlist OU
Sub OUselectSub
If OptionChooser.Value = 1 Then
oTaskSequenceB("OSDDomainOUName") = (LocationA)
End If
If OptionChooser.Value = 2 Then
oTaskSequenceB("OSDDomainOUName") = (LocationB)
End If
End Sub
</SCRIPT>
<body>
<input type="text" name="CompNameTextbox" size="30">
<select size="2" name="OptionChooser" onChange="OUselectSub">
<option value="1">Location1</option>
<option value="2">LocationB</option>
</select>
<input type="button" onclick="Deploy" value="Start deployment"
</body>
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.
Hi All
I'm new into HTA/vbscript. I did created this HTA vbscript file. The only thing i'm trying to find out is how to pass the values from the textbox and dropdownlist with the button so that the TS can continue with deployment.
The HTA is asking for a computername and OU.
Share this post
Link to post
Share on other sites