Creating the ultimate SCCM 2007 Frontend HTA for OSD Part II

Let start building our  HTA so we can get that prompt for variables step going. I’m not going to make it pretty that’s not my department but you will get the idea and can customize it then make it look good.

In case you didn’t know an HTA is a type of html document usually with vbscript. It CAN use css and javascript. It’s run by mshta.exe.

Ok like i said not pretty but you will get the idea.

 

Ok so this is just the shell basic hta setup and the controls on the page:

—————————————–

<HTML>
<HEAD>
<TITLE>Ultimate HTA / Outil de configuration Supreme</TITLE>
<meta http-equiv=”Content-Type” content=”text/html; charset=windows-1252″>
<!–
**********************************************************************
Ultimate HTA
———————————————————————-
By: Jaw
www.jawtech.com
**********************************************************************

—-not going to use this but leaving it as example of how to use css and js files

<link rel=”stylesheet” type=”text/css” href=”english.css” title=”eng” />
<link rel=”alternate stylesheet” type=”text/css” href=”francais.css” title=”fra” />
<script type=”text/javascript” src=”styleswitcher.js”></script>
————————————————————————
–>
<HTA:APPLICATION
ID=”HTA”
APPLICATIONNAME=”Ultimate HTA”
SCROLL = “NO”
SINGLEINSTANCE = “YES”
WINDOWSTATE = “NORMAL”
BORDER = “THIN”
SHOWINTASKBAR = “YES”
MAXIMIZEBUTTON = “NO”
MINIMIZEBUTTON = “NO”
SHOWINTASKBAR = “YES”
>

</HEAD>
<BODY>

<input type=”hidden” id=”langvar” name=”langvar” value=”eng”>
<hr>
<a href=”/” id=”eng” onclick=”setActiveStyleSheet(‘eng’); return false;”>English</a> /
<a href=”/” id=”fra” onclick=”setActiveStyleSheet(‘fra’); return false;”>Francais</a>
<hr>
<p>

Location
<select name=”divi” onchange=”divsel(divi.value)”>
<option value=”NA”>Unknown / inconnu</option>
<option value=”Ont”>Ontario</option>
<option value=”Quebec”>Quebec</option>
<option value=”BC”>British Columbia</option>
</select>

site  <SELECT name=”Items”></SELECT>

<br /><br />
Workstation Name: <INPUT type=”text” size=”65″ name=”workstationname”>

<br />
Description:
<INPUT type=”text” size=”65″ name=”description”>

<br /><br />
<INPUT type=”checkbox” id=”os” name=”os”> French Operating System<BR />
<INPUT type=”checkbox” id=”keyboard” name=”keyboard”> French Keyboard <BR />

<INPUT type=”checkbox” id=”patches” name=”patches”>  Apply patches Immediately  <br>

<br />
<INPUT type=”radio” id=”tz” name=”tz” value=”Newfoundland and Labrador Standard time” onchange=”tzchg()” />Newfoundland and Labrador Standard time<BR />
<INPUT type=”radio” id=”tz” name=”tz” value=”Atlantic Standard Time” onchange=”tzchg()”  />Atlantic Standard Time<BR />
<INPUT type=”radio” id=”tz” name=”tz” value=”Eastern Standard Time” onchange=”tzchg()”  />Eastern Standard Time<BR />
<INPUT type=”radio” id=”tz” name=”tz” value=”Central Standard Time” onchange=”tzchg()”  />Central Standard Time<BR />
<INPUT type=”radio” id=”tz” name=”tz” value=”Canada Central Standard Time” onchange=”tzchg()”  />Canada Central Standard Time<BR />
<INPUT type=”radio” id=”tz” name=”tz” value=”Mountain Standard Time” onchange=”tzchg()”  />Mountain Standard Time<BR />
<INPUT type=”radio” id=”tz” name=”tz” value=”Pacific Standard Time”  onchange=”tzchg()” />Pacific Standard Time<BR />

<br />
<input type=”button” value=”Clear Form Data” onclick=”clearform()”> &nbsp;
<input type=”button” value=”PowerShell Prompt” onclick=”ps()”> &nbsp;
<input type=”button” value=”Command Prompt” onclick=”cmd()”> &nbsp;
<input type=”button” value=”Save and Continue” onclick=”go()”>
</BODY>
</HTML>

———————————————————————————————