<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>OSD Option Choser</title>
<HTA:APPLICATION APPLICATIONNAME="OSD Option Choser" SCROLL="yes" SINGLEINSTANCE="yes" WINDOWSTATE="normal" BORDER="thin">
<script language="vbscript" type="text/vbscript">

window.resizeTo 600,760
window.moveTo 5,5

Sub FinishClickTasks
    window.close
    'On Error Resume Next
    Const ForAppending = 8
    Dim oTaskSequence, oShell, oFSO, oLogFile
    Dim sComputerName, sTimeZone, sTimeZoneKeyPath, sValueName, bDoAddUser, sDomainName
     
    sDomainName = "YourDomainName"

    Set oTaskSequence = CreateObject ("Microsoft.SMS.TSEnvironment")
    Set oShell = CreateObject ("WScript.Shell")
    Set oFSO = CreateObject ("Scripting.FileSystemObject")
    Set oLogFile = oFSO.OpenTextFile ("C:\CustomSystemOptions.log", ForAppending, True)

    oLogFile.WriteLine "Custom System Options"
    oLogFile.WriteLine "  => Started at " & Date & " " & Time

    ' UserName to add as a local administrator
    If UserName.Value <> "" Then
        Set oNetwork = CreateObject("WScript.Network")
        sComputerName = Ucase(oNetwork.ComputerName)

        Set oGroup = GetObject ("WinNT://" & sComputerName & "/Administrators,group")
        oGroup.Add ( "WinNT://" & sDomainName & "/" & UserName.Value &",group" )
        oLogFile.WriteLine "  => Added " & UserName.Value & " to the local administrators group"
    End If

    ' Set local time zone
    If Not TimeZone(2).checked Then
        If TimeZone(0).checked Then
            sTimeZone = "Pacific Standard Time"
        ElseIf TimeZone(1).checked Then
            sTimeZone = "US Mountain Standard Time"
        ElseIf TimeZone(3).checked Then
            sTimeZone = "Central Standard Time"
        ElseIf TimeZone(4).checked Then
            sTimeZone = "Eastern Standard Time"
        End If

    oShell.Run "%systemroot%\system32\control.exe TIMEDATE.CPL,,/Z " & sTimeZone
    oLogFile.WriteLine "  => Set system Time Zone to """ & sTimeZone & """"
    End If

    ' Applications to install
    ' Acrobat
    If Acrobat(0).checked Then
        oTaskSequence ("OSDAcrobat") = Acrobat(0).Value
    ElseIf Acrobat(1).checked Then
        oTaskSequence ("OSDAcrobat") = Acrobat(1).Value
    ElseIf Acrobat(2).checked Then
        oTaskSequence ("OSDAcrobat") = Acrobat(2).Value
    ElseIf Acrobat(3).checked Then
        oTaskSequence ("OSDAcrobat") = Acrobat(3).Value
    ElseIf Acrobat(4).checked Then
        oTaskSequence ("OSDAcrobat") = Acrobat(4).Value
    ElseIf Acrobat(5).checked Then
        oTaskSequence ("OSDAcrobat") = Acrobat(5).Value
    End If

    ' Microsoft Project
    If Project(0).checked Then
        oTaskSequence ("OSDProject") = Project(0).Value
    ElseIf Project(1).checked Then
        oTaskSequence ("OSDProject") = Project(1).Value
    End If

    ' Microsoft Visio
    If Visio(0).checked Then
        oTaskSequence ("OSDVisio") = Visio(0).Value
    ElseIf Visio(1).checked Then
        oTaskSequence ("OSDVisio") = Visio(1).Value
    End If

 
    ' Other Apps
    If BlackBerry.checked Then
        oTaskSequence ("OSDBlackBerry") = "True"
    End If
    If StreetsTrips2006.checked Then
        oTaskSequence ("OSDStreetsTrips2006") = "True"
    End If
    oLogFile.WriteLine "  => Completed at " & Date & " " & Time
End Sub


</script>
</head>

<body>
<!-- HTML goes here -->
<body STYLE="font:10 pt arial; color:white; background-color: #336600">

<!-- <p>Computer Name:<BR>
<input type=text id="ComputerName" name=ComputerName size=45></p>
-->

<p>Username to add to Local Admin Group (if applicable):<BR>
<input type=text id="UserName" name=UserName size=45></p>

<p><b>Select Time Zone for PC<br>
===========================</b><br>
<input type="radio" name="TimeZone" value="PST">PST (US West Coast)<BR>
<input type="radio" name="TimeZone" value="AZT">AZT (US Arizona)<br>
<input type="radio" name="TimeZone" value="MST" checked="True">MST (US Mountain)<BR>
<input type="radio" name="TimeZone" value="CST">CST (US Central)<BR>
<input type="radio" name="TimeZone" value="EST">EST (US East Coast)<BR>

<p><b>Select Post Installed Applications<br>
===========================</b><br>
<input type="radio" name="Acrobat" value="AcroStan7">Install Acrobat Standard 7<br>
<input type="radio" name="Acrobat" value="AcroStan8">Install Acrobat Standard 8<br>
<input type="radio" name="Acrobat" value="AcroStan9">Install Acrobat Standard 9<br>
<input type="radio" name="Acrobat" value="AcroPro7">Install Acrobat Professional 7<br>
<input type="radio" name="Acrobat" value="AcroPro8">Install Acrobat Professional 8<br>
<input type="radio" name="Acrobat" value="AcroPro9">Install Acrobat Professional 9<br>
<br>
<input type="radio" name="Project" value="ProjStan2003">Install Microsoft Project Standard 2003<br>
<input type="radio" name="Project" value="ProjPro2003">Install Microsoft Project Professional 2003<br>
<br>
<input type="radio" name="Visio" value="VisioStan2003">Install Microsoft Visio Standard 2003<br>
<input type="radio" name="Visio" value="VisioPro2003">Install Microsoft Visio Professional 2003<br>
<br>
<input type="checkbox" name="BlackBerry"> Install BlackBerry Desktop Manager<br>
<input type="checkbox" name="StreetsTrips2006"> Install Microsoft Streets and Trips 2006<br>

<p><button accesskey=N type=submit id=buttonFinish onclick=FinishClickTasks>Finish</button>
<p><font size=1>CustomSystemOptions.hta
<br>Created by Nick Moseley, SCCM Administrator</font>
</body>
</html>