Jump to content

Sign in to follow this  

Help with Custom HTA

Recommended Posts

I have been over the code and modified it as needed, but it will not actually Call the Optional Software. Can someone please tell me what I am missing.


The HTA runs and allows me to set the computer name and select the Optional Applications, the OSD Continues, and completes but no applications are installed.


Here is the HTA Code:

<title>My Company - SCCM Deployment</title>
<body STYLE="font:10 pt arial; color:white; background-color: #0000FF">

APPLICATIONNAME="My Company - SCCM Deployment"

sub DoResize
window.resizeTo 600,600
screenWidth = Document.ParentWindow.Screen.AvailWidth
screenHeight = Document.ParentWindow.Screen.AvailHeight
posLeft = (screenWidth - 700) / 2
posTop = (screenHeight - 430) / 2
'move to centerscreen
window.moveTo posLeft, posTop
end sub

DoResize() ' run the subroutine to position the containing window (your HTA dialog) before the body is rendered.

sub Window_onLoad()
iTimerID = window.setInterval("checkempty", 100, "VBScript")
end sub

sub checkempty()
if computerName.value="" then
end if
end sub

'Hides Task Sequence Progress
Set ProgressUI = CreateObject("Microsoft.SMS.TsProgressUI")

'Sets up actions to follow clicking on run
Sub ButtonFinish
dim InstallAcrobatPro9
dim InstallAvaya
dim InstallProject2010
dim InstallVisio2010
dim InstallOnDemand
dim InstallExceed
dim InstallIseries
dim InstallManu
dim InstallCA
dim InstallInform
dim InstallToad
dim InstallAllOptional
dim objLanguageButton
SET TSEnv = CreateObject("Microsoft.SMS.TSEnvironment")
'Sets PC Name
msgbox "PC NAME "& computername.Value &""
TSenv("OSDComputerName") = computername.Value
'Sets Variable For Acrobat Adobe Pro 9 Application
If InstallAdobePro9check.Checked Then
InstallAcrobatPro9 = "Y"
InstallAcrobatPro9 = "N"
End If
TSEnv("Install-AcrobatPro9") = InstallAcrobatPro9
'Sets Variable For Avaya One-X Communicator Application
If InstallAvayaCheck.Checked Then
InstallAvaya = "Y"
InstallAvaya = "N"
End If
TSEnv("Install-Avaya") = InstallCiscoAvaya
'Sets Variable For Project 2010 Application
If InstallProject2010check.Checked Then
InstallProject2010 = "Y"
InstallProject2010 = "N"
End If
TSEnv("Install-Project2010") = InstallProject2010
'Sets Variable For Microsoft Visio 2010 Application
If InstallVisio2010check.Checked Then
InstallVisio2010 = "Y"
InstallVisio2010 = "N"
End If
TSEnv("Install-Visio2010") = InstallVisio2010
'Sets Variable For Exceed On Demand
If InstallOnDemandCheck.Checked Then
InstallOnDemand = "Y"
InstallOnDemand = "N"
End If
TSEnv("Install-OnDemand") = InstallOnDemand
'Sets Variable For Exceed Full
If InstallExceedCheck.Checked Then
InstallExceed = "Y"
InstallExceed = "N"
End If
TSEnv("Install-Exceed") = InstallExceed
'Sets Variable For iSeries Client Access
If InstallIseriesCheck.Checked Then
InstallISeries = "Y"
InstallISeries = "N"
End If
TSEnv("Install-ISeries") = InstallISeries
'Sets Variable For Manugistics
If InstallManuCheck.Checked Then
InstallManu = "Y"
InstallManu = "N"
End If
TSEnv("Install-Manu") = InstallManu
'Sets Variable For CA Workload Automation
If InstallCACheck.Checked Then
InstallCA = "Y"
InstallCA = "N"
End If
TSEnv("Install-CA") = InstallCA
'Sets Variable For Informatica
If InstallInformCheck.Checked Then
InstallInform = "Y"
InstallInform = "N"
End If
TSEnv("Install-Inform") = InstallInform
'Sets Variable For Toad
If InstallToadCheck.Checked Then
InstallToad = "Y"
InstallToad = "N"
End If
TSEnv("Install-Toad") = InstallToad
'Sets Variable For Install All Optional Software
If InstallAllOptionalCheck.Checked Then
InstallAllOptional = "Y"
InstallAllOptional = "N"
End If
TSEnv("Install-AllOptional") = InstallAllOptional
'Sets Variable For Locale Language

For Each objLanguageButton in Installlocaleradio
If objLanguageButton.Checked Then
TSEnv("Install-Locale") = CStr(objLanguageButton.Value)
End If

'Closes window

End Sub


<TEXT><b>Computer Name </b><FONT COLOR=#FF0000>*Required*</FONT></TEXT><br>
<input type=text id="computerName" name=computerName size=40><br>
<br><B>Optional Applications to Install    <FONT COLOR=#FF0000>*Not in Use, Coming Soon*</FONT></B></br>
<input type="checkbox" name="InstallAdobePro9Check">Install Adobe Acrobat Pro 9<br>
<input type="checkbox" name="InstallAvayaCheck">Install Avaya One-X Communicator<br>
<input type="checkbox" name="InstallProject2010check">Install Microsoft Project<br>
<input type="checkbox" name="InstallVisio2010check">Install Microsoft Visio<br>
<input type="checkbox" name="InstallOnDemandCheck">Install Exceed On Demand<br>
<input type="checkbox" name="InstallExceedCheck">Install Exceed Full<br>
<input type="checkbox" name="InstallIseriesCheck">Install iSeries Client Access<br>
<input type="checkbox" name="InstallManuCheck">Install Manugistics<br>
<input type="checkbox" name="InstallCACheck">Install CA Workload Automation<br>
<input type="checkbox" name="InstallInformCheck">Install Informatica<br>
<input type="checkbox" name="InstallToadCheck">Install Toad<br>
<input type="checkbox" name="InstallAllOptionalCheck">Install All Optional Software<br>
<br><B>Please Select Language   <FONT COLOR=#FF0000>*Not in Use, Coming Soon*</FONT></B></br>
<input type="radio" name="Installlocaleradio" value="en-us" checked>English<br>
<input type="radio" name="Installlocaleradio" value="gr-de">German<br>
<input type="radio" name="Installlocaleradio" value="ch-chs">Chinese (Simplified)<br>
<input type="radio" name="Installlocaleradio" value="ch-cht">Chinese (Traditional)<br>
<input type="radio" name="Installlocaleradio" value="jp-jp">Japanese<br><p>
<input id=runbutton type="button" value="Run Image Process" name="run_button" onClick="ButtonFinish">







TS part 1 of 2.pdf

TS part 2 of 2.pdf

Share this post

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

  • Create New...