Jump to content




anyweb

Introducing the windows-noob.com FrontEnd HTA ver 1.0



Recommended Posts

I have an extra reboot right in the beginning that I cannot seem to get rid of. When I boot into PXE (64bit or 32bit) it allows me to select the Windows Noob HTA, it says it's copying the windows preinstallation environment and then requests that the PC be rebooted. I have looked through the tasks sequences but I cannot find where this is coming from.

 

Is this avoidable?

Share this post


Link to post
Share on other sites


Thanks for all your posts. I've learnt a lot.

I use your FrontEnd HTA tool and i wondered: is there a procedure to retain the static ip entered during the winpe phase?

I use statics IP addresses (No PXE & DHCP)

 

 

I answer myself:

I've added 2 phases in your Task Sequence (yes, i use your worderful TS. Thanks!!!);

1. Run Command Line (before Apply Operating System Imagen phase)--> cscript scripts\ZTINICConfig.wsf /ForceCapture

2. Run Command Line (after Apply Windows Settings phase) --> cscript scripts\ZTINICConfig.wsf /RestoreWithinWinPE

 

First, I try to follow some posts like this (http://www.windows-noob.com/forums/index.php?/topic/4700-network-install-using-boot-media-no-dhcp/) but it doesnt work for me :(

Share this post


Link to post
Share on other sites

The "windows-noob.com Fronted HTA v1.0" Task sequence has two "State Restore" phases. Both of them have this condition:

 

If Any the conditions are true:

usmtdropdown equals SMP

DeploymentType equals refresh

 

 

I see that usmtdropdown variable is set in the New Computer Deployment Type to restore user state, and in Reflesh Deployment type doesnt it either. where do you make backup to SMP?? It isnt in this TS?

Share this post


Link to post
Share on other sites

correct, it isnt, you have to backup to the SMP using a separate ts. you can however do a computer association using this ts.

 

actually this is pointed out on the first page !

 

The Backup option allows you to Backup the data in several different ways (option to run CHKDSK before backup, full WIM backup both locally and network, Offline Scanstate in WinPE which is then backed up to a network Share) and also allows you to Create a computer association between source and destination computer while in WinPE if you want to do traditional SMP based state backup (note however for SMP based scenarios that the scanstate must be performed separately while in the full Windows OS using a separate Task Sequence).]

Share this post


Link to post
Share on other sites

Can you think of any reason why my language packs won't install? smstslog says that it installs OK. I'm setting language to German and I do have the German.lp setup as a package. Localization settings work fine, but the language pack just never gets installed.

Share this post


Link to post
Share on other sites

check your bdd_pkgmgr.log.txt what does it say, it will be in c:\_smstasksequence\smsosd\osdlogs\ while the language packs are installing (but not after)

Share this post


Link to post
Share on other sites

I checked throughout the whole process and never saw a smsosd folder being created under c:\_smstasksequence. Any other ideas?

Share this post


Link to post
Share on other sites

if it's not creating the folder then possibly it's skipping the group/steps altogether, did you verify that it's running those steps ? try adding a pause to verify

Share this post


Link to post
Share on other sites

It wasn't skipping the steps but I did find out what the problem was. When I created the package I pointed it to \\sccm\source\language\de-de\ instead of pointing it to \\sccm\source\language\

 

I changed the package and then German installed without any issues.

 

For what it's worth, I will be installing multiple languages and I setup my source folder like this - \\sccm\source\language\de-de\de-de\lp.cab so that I could create different packages for different locations.

 

Thanks for checking in Niall.

Share this post


Link to post
Share on other sites

I'll do a migration tomorrow if i have time and migrate the TS over, once done i'll post it here...

Share this post


Link to post
Share on other sites

Hi AnyWeb,

 

I have the below HTA, This HTA was used in a different domain and now I want to impliment that in my test lab. which collect information like PC name, computer description, OU...etc at the PXE stage. the issue is i am getting an error when the HTA loads up at the beging of the task sequence

Line 71

Char:1

error: invalid syntax

code:0

 

if I say continue I get another error

 

Line :110

Char:5

error: Object required: objCommand

code:0

 

if I click continue the HTA loads up but computer sites, floor within sites and laptop model fields won't populate. I have pasted the saurce. can someone please help me with this?

 

<html>

<head>

<title>Workstation Deployment</title>

<HTA:APPLICATION

ID="objDEPLOYMENT"

APPLICATIONNAME="DEPLOYMENT"

SCROLL="no"

SINGLEINSTANCE="yes"

WINDOWSTATE="MAXIMIZED"

MaximizeButton = "no"

MinimizeButton = "no"

CloseButton = "no"

SysMenu = "no"

>

<style type="text/css">

.style2

{

font-size: medium;

font-weight: bold;

}

.style3

{

height: 54px;

}

.style4

{

}

.style5

{

height: 52px;

}

.style7

{

}

.style9

{

width: 235px;

}

.style10

{

}

.style11

{

width: 200px;

}

.style12

{

width: 250px;

}

</style>

</head>

<SCRIPT LANGUAGE="VBScript">

'**Start Encode**

strDomainName = "DJ"

strDomainMaster = strDomainName & "\administrator"

strDomainMasterPwd = "password"

strDomainController = "DJDC"

strMainCompOU = "OU=" & strDomainName & " Computers,DC=" & strDomainName & ",DC=DJ,DC=LOCAL"

strLapUtilOU = "OU=Laptop Utils,OU=Application Groups,OU=" & strDomainName & " Groups,DC=" & strDomainName & ",DC=DJ,DC=LOCAL"

Const ADS_SCOPE_SUBTREE = 2

Const ADS_SECURE_AUTHENTICATION = 1

Const ADS_SERVER_BIND = 200

Set objShell = CreateObject("Wscript.Shell")

objShell.regWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\1\1406", 0, "REG_DWORD"

objShell.regWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\3\1406", 0, "REG_DWORD"

 

Set objDomain = GetObject("LDAP:").OpenDSObject("LDAP://" & strDomainController & "/DC=" & strDomainName & ",DC=DJ,DC=LOCAL" , strDomainMaster , strDomainMasterPwd ,ADS_SECURE_AUTHENTICATION + ADS_SERVER_BIND)

Set objConnection = CreateObject("ADODB.Connection")

Set objCommand = CreateObject("ADODB.Command")

objConnection.Provider = "ADsDSOObject"

objConnection.Properties("User ID") = strDomainMaster

objConnection.Properties("Password") = strDomainMasterPwd

objConnection.Properties("Encrypt Password") = TRUE

objConnection.Properties("ADSI Flag") = ADS_SERVER_BIND Or ADS_SECURE_AUTHENTICATION

objConnection.Open "Active Directory Provider"

Set objCommand.ActiveConnection = objConnection

objCommand.Properties("Page Size") = 1000

objCommand.Properties("Searchscope") = ADS_SCOPE_SUBTREE

 

Sub CheckKeys

If window.event.altKey And window.event.keyCode = 115 then

Call alert("please do not close this window")

document.parentwindow.event.keyCode = 0

document.parentwindow.event.cancelBubble = true

document.parentwindow.event.returnvalue = false

End If

End Sub

Sub Window_onload

'On Error Resume Next

Dim objProgressUI

Dim arrSitesName()

Dim arrSitesDesc()

 

Set objProgressUI = CreateObject("Microsoft.SMS.TsProgressUI")

objProgressUI.CloseProgressDialog

window.resizeTo 800,600

Set dropdownNode = document.createElement("OPTION")

dropdownNode.Text = "Select a computer site"

dropdownNode.Value = ""

ctrlComputerSite.Add(dropdownNode)

 

objCommand.CommandText = "SELECT name FROM 'LDAP://" & strDomainController & "/" & strMainCompOU & "' WHERE objectCategory='organizationalUnit'"

Set objRecordSet = objCommand.Execute

i = 0

 

If objRecordSet.EOF then

Set dropdownNode = document.createElement("OPTION")

dropdownNode.Text = "No sites have been found"

ctrlComputerSite.Add(dropdownNode)

Else

objRecordSet.MoveFirst

Do Until objRecordSet.EOF

strOUName = objRecordSet.Fields("name").Value

If Len(strOUName) > 3 then

objRecordSet.MoveNext

Else

i = i + 1

objRecordSet.MoveNext

End If

Loop

 

ReDim arrSitesName(i)

ReDim arrSitesDesc(i)

 

i = 0

 

objCommand.CommandText = "SELECT name, description FROM 'LDAP://" & strDomainController & "/" & strMainCompOU & "' WHERE objectCategory='organizationalUnit'"

Set objRecordSet = objCommand.Execute

objRecordSet.MoveFirst

Do Until objRecordSet.EOF

strOUName = objRecordSet.Fields("name").Value

If Len(strOUName) > 3 then

objRecordSet.MoveNext

Else

arrSitesName(i) = strOUName

If IsNull(objRecordSet.Fields("description").Value) Then

strDesc = ""

Else

For Each strDesc in objRecordSet.Fields("description").Value

If strDesc = "" then

Exit For

Else

arrSitesDesc(i) = strDesc

End If

Next

End If

i = i + 1

objRecordSet.MoveNext

End If

Loop

End If

d = 0

Do While d < i

Set dropdownNode = document.createElement("OPTION")

dropdownNode.Text = arrSitesName(d) & " - " & arrSitesDesc(d)

dropdownNode.Value = arrSitesName(d)

ctrlComputerSite.Add(dropdownNode)

d = d + 1

 

Loop

End Sub

Sub Update_ctrlSiteFloor

On Error Resume Next

For Each dropdownNode in ctrlSiteFloor.Options

dropdownNode.RemoveNode

Next

 

strComputerSite = ctrlComputerSite.value

 

If strComputerSite = "" Then

Set dropdownNode = document.createElement("OPTION")

dropdownNode.Text = "Loading....."

dropdownNode.Value = ""

ctrlSiteFloor.Add(dropdownNode)

intErrResult = MsgBox("You have not selected a computer site. Please select a computer site before proceeding",48,"Computer Site not Defined")

Exit Sub

End If

strSiteOU = "LDAP://" & strDomainController & "/OU=" & strComputerSite & "," & strMainCompOU

i = 0

 

Set dropdownNode = document.createElement("OPTION")

dropdownNode.Text = "Select a Site Floor"

dropdownNode.Value = ""

ctrlSiteFloor.Add(dropdownNode)

 

objCommand.CommandText = "SELECT name FROM '" & strSiteOU & "' WHERE objectCategory='organizationalUnit'"

Set objRecordSet = objCommand.Execute

 

If objRecordSet.EOF then

Set dropdownNode = document.createElement("OPTION")

dropdownNode.Text = "No sites have been found"

ctrlComputerSite.Add(dropdownNode)

Else

objRecordSet.MoveFirst

i = 0

Do Until objRecordSet.EOF

strOUName = objRecordSet.Fields("name").Value

If InStr("Desktop", strOUName) <> 0 or InStr("Laptop", strOUName) <> 0 or strOUName = strComputerSite then

objRecordSet.MoveNext

Else

Set dropdownNode = document.createElement("OPTION")

dropdownNode.Text = strOUName

dropdownNode.Value = strOUName

ctrlSiteFloor.Add(dropdownNode)

i = 1

objRecordSet.MoveNext

End If

Loop

 

If i <> 1 then

For Each dropdownNode in ctrlSiteFloor.Options

dropdownNode.RemoveNode

Next

Set dropdownNode = document.createElement("OPTION")

dropdownNode.Text = "Site has no floors"

dropdownNode.Value = "N/A"

ctrlSiteFloor.Add(dropdownNode)

End If

End If

End Sub

Sub Update_LaptopModel

On Error Resume Next

For Each dropdownNode in ctrlLaptopMod.Options

dropdownNode.RemoveNode

Next

 

strComputerType = ctrlComputerType.value

 

If strComputerType = "" then

Set dropdownNode = document.createElement("OPTION")

dropdownNode.Text = "Loading....."

dropdownNode.Value = ""

ctrlLaptopMod.Add(dropdownNode)

intErrResult = MsgBox("You have not selected a computer type. Please select a computer type before proceeding",48,"Computer Type not Defined")

Exit Sub

End If

 

If strComputerType = "Desktop" then

Set dropdownNode = document.createElement("OPTION")

dropdownNode.Text = "Desktop has been selected"

dropdownNode.Value = "NA"

ctrlLaptopMod.Add(dropdownNode)

Else

objCommand.CommandText = "SELECT Name FROM 'LDAP://" & strDomainController & "/" & strLapUtilOU & "' WHERE objectCategory='group'"

Set objRecordSet = objCommand.Execute

 

If objRecordSet.EOF Then

Set dropdownNode = document.createElement("OPTION")

dropdownNode.Text = "No Laptop Models have been identified"

ctrlLaptopMod.Add(dropdownNode)

Else

objRecordSet.MoveFirst

Do Until objRecordSet.EOF

strGroupName = objRecordSet.Fields("Name").Value

strGroupDesc = Mid(strGroupName, 5)

intTempLen = Len(strGroupDesc)

strGroupDesc = Left(strGroupDesc, intTempLen - 13)

Set dropdownNode = document.createElement("OPTION")

dropdownNode.Text = strGroupDesc

dropdownNode.Value = strGroupName

ctrlLaptopMod.Add(dropdownNode)

objRecordSet.MoveNext

Loop

End If

End If

End Sub

Sub RunScript

On Error Resume Next

Set objTS = CreateObject("Microsoft.SMS.TSEnvironment")

Set objFSO = CreateObject("Scripting.FileSystemObject")

strComputerType = ctrlComputerType.value

strComputerName = ctrlComputerName.value

strComputerSite = ctrlComputerSite.value

strSiteFloor = ctrlSiteFloor.value

strDomainAccount = strDomainName & "\" & ctrlAccountUserName.value

strDomainPassword = ctrlAccountPassword.value

 

Set objDomain = GetObject("LDAP:").OpenDSObject("LDAP://" & strDomainController & "/DC=" & strDomainName & ",DC=WA,DC=GOV,DC=AU" , strDomainAccount , strDomainPassword ,ADS_SECURE_AUTHENTICATION + ADS_SERVER_BIND)

Set objConnection = CreateObject("ADODB.Connection")

Set objCommand = CreateObject("ADODB.Command")

objConnection.Provider = "ADsDSOObject"

objConnection.Properties("User ID") = strDomainAccount

objConnection.Properties("Password") = strDomainPassword

objConnection.Properties("Encrypt Password") = TRUE

objConnection.Properties("ADSI Flag") = ADS_SERVER_BIND Or ADS_SECURE_AUTHENTICATION

objConnection.Open "Active Directory Provider"

Set objCommand.ActiveConnection = objConnection

objCommand.Properties("Page Size") = 1000

objCommand.Properties("Searchscope") = ADS_SCOPE_SUBTREE

 

If err.number <> 0 then

intErrResult = MsgBox("You have supplied an invalid Username or Password. Please check your Username & Password and try again.",16,"Supplied credentials invalid")

Exit Sub

End If

 

If strSiteFloor = "N/A" Then

strDomainOU = "LDAP://OU=" & strComputerType & ",OU=" & strComputerSite & ",OU=" & strDomainName & " COMPUTERS,DC=" & strDomainName & ",DC=DJ,DC=LOCAL"

Else

strDomainOU = "LDAP://OU=" & strComputerType & ",OU=" & strSiteFloor & ",OU=" & strComputerSite & ",OU=" & strDomainName & " COMPUTERS,DC=" & strDomainName & ",DC=WA,DC=GOV,DC=AU"

End If

 

strLaptopMod = ctrlLaptopMod.value

strComputerDesc = ctrlComputerDesc.value

strServiceDeskJob = ctrlServiceDeskJob.value

strFQDN = strDomainName & ".wa.gov.au"

strPreviousCompName = ctrlPreviousComputerName.value

 

i = 1

 

Do While i < 8

Select Case i

 

Case 1

If strComputerName = "" Then

intErrResult = MsgBox("You have not entered a computer name. Please enter a computer name before proceeding",48,"Computer name not Defined")

Exit Sub

Else

'If strComputerType = "Desktop" then

' If InStr(strComputerName, "PCD") = 0 Or InStr(strComputerName, "SV") = 0 then

' intErrResult = MsgBox("You have not entered a valid computer name. Please enter a valid computer name before proceeding",48,"Computer name not valid")

' Exit Sub

' End If

'End If

End If

i = i + 1

 

Case 2

If strComputerType = "" Then

intErrResult = MsgBox("You have not selected a computer type. Please select a computer type before proceeding",48,"Computer Type not Defined")

Exit Sub

End If

i = i + 1

 

Case 3

If strComputerSite = "" Then

intErrResult = MsgBox("You have not selected a computer site. Please select a computer site before proceeding",48,"Computer Site not Defined")

Exit Sub

End If

i = i + 1

 

Case 4

If strDomainName = "" Then

intErrResult = MsgBox("You have not selected a PTA Domain. Please select a PTA Domain before proceeding",48,"Domain not Defined")

Exit Sub

End If

i = i + 1

 

Case 5

If strDomainAccount = strDomainName & "\" Then

intErrResult = MsgBox("You have not entered your username. Please enter your username before proceeding",48,"Username not Defined")

Exit Sub

End If

i = i + 1

 

Case 6

If strDomainPassword = "" Then

intErrResult = MsgBox("You have not entered your password. Please enter your password before proceeding",48,"Password not Defined")

Exit Sub

End If

i = i + 1

 

Case 7

If strComputerDesc = "" Then

intErrResult = MsgBox("You have not entered a computer description. Please enter a computer description before proceeding",48,"Computer Description not Defined")

Exit Sub

End If

i = i + 1

 

End Select

Loop

 

objTS("OSDDomainName") = strFQDN

objTS("OSDDomainOUName") = strDomainOU

objTS("OSDJoinAccount") = strDomainAccount

objTS("OSDJoinPassword") = strDomainPassword

objTS("OSDNetworkJoinType") = "0"

objTS("OSDJoinSkipReboot") = "false"

objTS("OSDComputerName") = strComputerName

Set objTxtWrite = objFSO.CreateTextFile("Y:\temp\" & strComputerName & ".txt")

objTxtWrite.WriteLine(strDomainOU)

objTxtWrite.WriteLine(strLaptopMod)

objTxtWrite.WriteLine(strDomainAccount)

objTxtWrite.WriteLine(strComputerDesc)

objTxtWrite.WriteLine(strServiceDeskJob)

objTxtWrite.WriteLine(strPreviousCompName)

objTxtWrite.WriteLine(strSiteFloor)

objTxtWrite.Close

 

window.close

End Sub

</SCRIPT>

<body onkeydown="CheckKeys()">

<font face="Tahoma"><center>

<table width=100%>

<tr bgcolor="#2C7993" height=50>

<td>

<font color="#FFFFFF" face="Tahoma"><center class="style2">

Public Transport Authority System Centre Configuration Manager 2007 Image Deployment (CMR)</center></font>

</td>

</tr>

<tr height=50>

<td>

Please enter the details for this new computer</td>

</tr>

</table>

<table width=100%>

<tr>

<td class="style9">

Computer Name:

</td>

<td class="style12">

<input type="text" id="ctrlComputerName" name="ctrlComputerName" size="30" title="Enter the computer name. Example: PC100001">

</td>

<td class="style11">

Service<font face="Tahoma"> Desk Job #:</font></td>

<td>

<font face="Tahoma">

<input id="ctrlServiceDeskJob" name="ctrlServiceDeskJob" type="text" size="30"/></font></td>

</tr>

<tr>

<td class="style9">

<font face="Tahoma">Previous PC Name:</font></td>

<td class="style12">

<font face="Tahoma">

<input id="ctrlPreviousComputerName" name="ctrlPreviousComputerName" size="30"

type="text" value="N/A" /></font></tr>

<td class="style10">

 </tr>

<td class="style10">

 </tr>

<tr>

<td class="style9">

<font face="Tahoma">Computer Site:</font></td>

<td class="style12">

<font face="Tahoma">

<select id="ctrlComputerSite" name="ctrlComputerSite" onchange="Update_ctrlSiteFloor">

</select></font></tr>

<td>

<font face="Tahoma">Computer Type:</font></tr>

<td>

<font face="Tahoma">

<select id="ctrlComputerType" name="ctrlComputerType" onchange="Update_LaptopModel">

<option selected>Select a computer type</option>

<option value="Desktop">Desktop</option>

<option value="Laptop">Laptop</option>

</select></font></tr>

<tr>

<td class="style9">

<font face="Tahoma">Floor within Site:</font></td>

<td class="style12">

<font face="Tahoma">

<select id="ctrlSiteFloor" name="ctrlSiteFloor" title="Only to be used for PTC, CIT and CLA Sites">

<option>Loading.....</option>

</select></font></td>

<td>

<font face="Tahoma">Laptop Model:</font></td>

<td>

<font face="Tahoma">

<select id="ctrlLaptopMod" name="ctrlLaptopMod" title="Only to be used if machine is a laptop">

<option>Loading.....</option>

</select></font></td>

</tr>

<tr>

<td class="style4" colspan="4">

<hr />

</td>

</tr>

<tr>

<td class="style5" colspan="4">

Please enter a description of this computer:</td>

</tr>

<tr>

<td class="style9">

Computer Description:</td>

<td colspan="3">

<input id="ctrlComputerDesc" name="ctrlComputerDesc" type="text" size="60" /></td>

</tr>

<tr>

<td class="style7" colspan="4">

<font face="Tahoma">

<hr />

</font>

</td>

</tr>

<tr>

<td class="style3" colspan="4">

Please enter your admin account details to join this machine to the domain.</td>

</tr>

<tr>

<td class="style9">

User Name: </td>

<td colspan="3">

<input id="ctrlAccountUserName" name="ctrlAccountUserName" type="text" size="30" title="Enter your User Name. Example: wex103761a"/></td>

</tr>

<tr>

<td class="style9">

Password:</td>

<td colspan="3">

<input id="ctrlAccountPassword" name="ctrlAccountpassword" type="password" size="30" title="Enter your Password."/></td>

</tr>

</table>

<table width=100%>

<tr>

<td height=80>

<font face="Tahoma">

<center><input id=runbutton class="button" type="button" value="OK" name="run_button" onclick="RunScript"></center>

</font>

</td>

</tr>

</table>

</center></font>

</body>

Share this post


Link to post
Share on other sites

please post that HTA and question in a separate post, this thread is about the windows-noob.com Frontend HTA

Share this post


Link to post
Share on other sites

Hi,

 

I need to implement only the computer association part, I am migrating computers from Windows XP to Windows 7 using SCCM 2012. I need to copy users profiles and restore to a new machine, how can I use your tool to implement this? ( I am new on SCCM) I have a task sequence running a ScanState and saving the MIG file on server. I need to have an HTA page to change the computer association. Please help.

Share this post


Link to post
Share on other sites

this one does that functionality,

read the features, then checkout the install guide

 

Share this post


Link to post
Share on other sites

Has anyone tested this frontend with vNext much? I'm curious if there have been any issues with the web service.

Share this post


Link to post
Share on other sites

which versions do you mean, please be specific

Share this post


Link to post
Share on other sites

Versions of???

 

I assume that Maik Koster's web service is still at v7.3...I'm unsure what the latest build for CM is in the technical preview...so as long as the web service is working, then I presume that any changes that need to be made to the front end piece will be fairly minor.

Share this post


Link to post
Share on other sites

i havent tested it with Technical Preview 2 but if i do so i'll let you know,

 

you should really look at the latest version of this frontend and it's here.

 

Share this post


Link to post
Share on other sites

Thanks...I didn't know the frontend had been updated. I looked at the original post, but didn't see any links to an updated version. Maybe we could update the original post with a link to the new frontend?

Share this post


Link to post
Share on other sites

yup i'll do that

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


×