The main idea with this HTA is to assist small and medium sized organizations with an easy way to implement a custom OSD solution without having any developer or HTML skills. The HTA solutions can be used when booting directly into WinPE and to prestage computers.
Why; You might ask, Why, do Coretech create this tool instead of using the built-in tools in Configuration Manager or using the UDI wizard in Microsoft Deployment Toolkit? The answer is straight forward. We often run into customers who do not have the knowledge it takes to build custom solutions or use the UDI designer. Our Coretech HTA is intended to those administrators where OSD only plays a small part in their working life but never the less must have custom solution that works right out of the box.
– And hey Coretech dudes; why don’t you just use the MDT database and all the MDT features? Why do you spend time creating solutions that already exist “out there”? Well, because we are talking with multiple customers that are not OSD experts and just want to have a simple solution.
The main benefits of using the Coretech HTA is:
- Very easy to implement
- No developing skills are required to install or maintain the solution
- Automate the computer naming standard
- Easily create OSD “roles” and target specific applications/packages to each role.
- Create custom selections like integrating USMT, Bitlocker etc.
- Control language and time zones.
- Configure primary user.
We control and configure most settings using variables on computer objects and collections. This method might be new to you, and will certainly require a new way of thinking.
Download HTA and Task Sequence
System requirements
The following requirements must be met before installing the HTA:
- A domain user account, the account will be granted permissions in Configuration Manager to create and delete computer objects. The user account do not require any additional permissions. The account used in this guide is named viamonstra\cm_hta.
- System Center 2012 Configuration Manager SP1 or later. For those who are running ConfigMgr 2012 R2, you also required to install KB2905002 and KB2907591
- Microsoft Deployment Toolkit integration and a MDT toolkit package.
- A share than can host the HTA files. In this blog post \\cm01\sccm_sources$\OSD will be used.
What the HTA is not
The HTA is not an Enterprise solution or a replacement for MDT.
Install the HTA
- Ensure you have a HTA user account created in Active Directory as mentioned in the system requirements.
- Run the hta_installer.exe as administrator and fill Install Folder, HTA user and Password.
- When ready click Install close the window when the installation is done.
What happens during the installation?
- A new user role is created and associated with the HTA user account.
- A new boot image is added.
- A new folder called OSD is added along with several OSD collections.
- A Task sequence is part of the download and can be imported. The task sequence includes examples on how you can use the collection variables in the deployment.
- During the install process, the files used to support the HTA solution is copied to the share specified in the installer. In my example the share is
Files in the main folder:
HTA.exe is the main executable.
StartHTA.vbs used to the HTA in “prestage mode”.
Files in the Bootimage folder:
The custom boot image
Files in the Bootimage\Prestart folder:
RunHTA.exe maps the drive letter T to the HTA file share, and executes the RunHTA.vbs
RunHTA.vbs executes the HTA.exe main executable and waits for it to end.
Files in the Config folder:
Config.xml, the main configuration file containing information about the site server and the main OSD folder.
Logo.png, the top logo used in the HTA.
PCNumber.txt keeps track of the running number. The file is used if a running number is being used as part of the computer name.
RunAfter.bat contains commands executed after the HTA.
RunBefore.bat contains commands executed before the HTA.
How to get started with the Coretech HTA solution
You are almost ready to use the solution as soon as the install is finished. Only a few details needs to be configured before you can deploy the very first image in your environment.
Modify the custom boot image
- From the Software Library, select Operating Systems, Boot Images.
- Open the HTA Boot Image (x86) boot image properties, select the Optional Components tab.
- Select Optional Components, click the Yellow icon and add HTML (WinPE-HTA) and Database (WinPE-MDAC) support.
- Click OK and update the boot image.
- Distribute the boot image to your distribution points and PXE enabled distribution points.
Deploy the task sequence
In theory the HTA is now ready for use (although you might want to customize the task sequence first).
- In order to use the task sequence you need to create a deployment to the Unknown computers collection and each of the collections that can contain a machine object. In the example below three available deployments are created allowing me to deploy a custom Windows 8.1 or Windows 7 image to the Developers collection.
- WinPE will launch and show the HTA, in this example I’ll create a new Windows 8.1 computer in the developer collection. To do so, click Windows 8 and Developer. Specify a computer name (this can be 100% automated using the collection variables) and the primary user of the device.
- Click Additional selections and select a language from the dropdown box (you can add multiple languages in the OSD collection hierarchy).
- Click Install to begin the image process. What happens now is that the HTA will look for an existing object in ConfigMgr, delete the object and create a new computer object in the Windows 8 Developer Collection.
- If you open the computer properties in the ConfigMgr console you’ll notice several computer variables
- If you open the OSD Windows 8 developer collection and select the Variables tab, you’ll find additional variables. Those are not effective by default, but can be used in the task sequence to control department specific applications and other cool stuff.
- To deploy specific applications to the developers, open the Task Sequence and navigate to the Software –Developer step.
- From Add, select General, Install Application and specify the applications.
- Select the Options tab, and click Add Condition, Task Sequence Variable.
- In variable type HTA_Type and in value type Developer. This will ensure that only computers in a collection with the Developer variable (both Windows 7 and Windows 8.1) will run the step.
- Click OK and close the task sequence.
Modify the default values in the HTA
The true value of the HTA is found in the simplicity when it comes to making changes. Changes like controlling the computer names, modifying the default values etc. All you need to know is the variable and the optional values. Below is the list of some of the values you can modify in the hta_main collection, after that are some examples that you might find useful.
Variable |
Values |
Example |
Description |
CM_CleanUp |
TRUE FALSE |
TRUE |
TRUE will delete all Computer Objects in Configuration Manager with the same BIOS GUID or MAC Address as the Computer being processed. |
CM_RefreshAll |
TRUE FALSE |
TRUE |
TRUE, will update the All Systems collection. |
ComputerName_Chassis_Desktop |
String |
D |
Defines the Chassis value used as part of the ComputerName Structure if the Computer is a Desktop. |
ComputerName_Chassis_Laptop |
String |
L |
Defines the Chassis value used as part of the ComputerName Structure if the Computer is a Laptop. |
ComputerName_Chassis_Virtual |
String |
V |
Defines the Chassis value used as part of the ComputerName Structure if the Computer is a Virtual machine. |
ComputerName_Chassis_Tablet |
String |
T |
Defines the Chassis value used as part of the ComputerName Structure if the Computer is a Tablet. |
ComputerName_Number_Increment |
TRUE FALSE |
TRUE |
TRUE the Number Value will be incremented, when Number is used as part of the ComputerName Structure. |
ComputerName_Number_UseText |
TRUE FALSE |
TRUE |
TRUE the Text field in the ComputerName Structure will be used instead of the default Number field. |
ComputerName_Number_UseText_Length |
Integer |
4 |
Defines the character length of the Number. Mandatory if ComputerName_Number_UseText is configured to True. |
ComputerName_Static |
String |
CT |
Defines the value used if Static is used as part of the ComputerName Structure. |
ComputerName_Structure |
String Array |
S2;C1;N4 |
Defines the ComputerName Structure, each field with its length, separated with semicolon. C = Chassis D = Dropdown N = Number R = Role S = Static T = Text U= User Name |
HTA_Domain |
String |
coretech.dk |
Defines the value used as the start value for the Primary User UserName field. |
HTA_Select_Type |
Button Dropdown |
Dropdown |
If set to Button, the Mandatory Selection section of the HTA, will be shown as Buttons. If set to Dropdown, the Mandatory Selection section of the HTA, will be shown as Dropdown boxes. |
HTA_Select_Type_Button_Columns |
1 2 3 4 5 |
3 |
Defines the number of columns the Buttons in the Mandatory Selection section of the HTA, is shown in. Needs to be defined when HTA_Select_Type is set to Button |
HTA_Text_SelectRole |
String |
Select Role |
Defines the Text to use as the header for Role Selection in the Mandatory Selection section. |
HTA_Text_SelectRoleType |
String |
Select Type |
Defines the Text to use as the header for Role Type Selection in the Mandatory Selection section. |
HTA_Text_SpecifyComputerName |
String |
Specify Computer Name |
Defines the Text to use as the header for ComputerName specification in the Mandatory Selection section. |
HTA_Text_SpecifyComputerName_Structure |
String Array |
Static;Chassis;Number |
Defines the Text to use as the headers for each part of the ComputerName structure in the Mandatory Selection section, separated with semicolon. Needs to have the same number of parts as the ComputerName_Structure |
HTA_Text_SpecifyPrimaryUser |
String |
Specify Primary User |
Defines the Text to use as the header for Primary User specification in the Mandatory Selection section. |
HTA_Text_SpecifyPrimaryUser_UserName |
String |
UserName |
Defines the Text to use as the header for Primary User UserName specification in the Mandatory Selection section. |
OSD_Name_Remove |
String |
OSD |
Defines the text to remove from Collection Names, when showing them in the HTA. |
OSD_Roles |
FolderID |
16777284 |
Defines the Root Role FolderId of the HTA Configuration |
OSD_Roles_Default |
FolderID |
16777290 |
Defines the default Role choice for the HTA Configuration. |
OSD_Selections |
FolderID |
16777285 |
Defines the Root Selection FolderId of the HTA Configuration |
VARNAME_OSDCOMPUTERNAME |
String |
OSDComputerName |
Defines the Variable Name of the ComputerName Value |
VARNAME_PRESTAGE |
String |
PrestagedBy |
Defines the Variable Name of the PrestagedBy Value |
VARNAME_SMSTSASSIGNUSERSMODE |
String |
SMSTSAssignUsersMode |
Defines the Variable Name of the AssignUsersMode Value |
VARNAME_SMSTSUDAUSERS |
String |
SMSTSUdaUsers |
Defines the Variable Name of the UdaUsers Value |
Modify the HTA
The HTA is controlled by folders and collections. If you look at the main HTA you’ll notice two main buttons (Windows 7 and Windows 8), those correspond to the folders created in the Roles folder. By creating a new folder in Roles, you’ll automatically create a new main button in the image.
Once the role is selected, one or more role types are available. Those are controlled by the collections you have created in the role folder. In this example I have created 3 different Server 2012 R2 role types.
Prestaging computers
You can prestage computers by running the hta.vbs directly from the server. The only difference is that you will be prompted for a user name, password and a MAC address. Once you have entered those information you’ll be presented with the HTA from where you can configure the computer information.
What’s next
This blog post is meant to be an introduction that will give you enough information to get started with using the tool. The solution also contains other features, so stay tuned more information will follow.
This tool would never have existed if it wasn’t for my fantastic team of dedicated collegues, huge colleagues goes to both Jakob Svendsen (contributing developer) and Claus Codam (main developer).
Great work! Just wanted to inform you that the installer creates 2 x86 boot images, but no x64.
Thomas.
Forget this comment, eyetrouble 🙂
Is it possible to remove the usmt and Language selections? Or remove the entire additional selections option ?
Hi
Thank you for this good information and for the hta
Please can you explain how to display the hta during task sequence?
It did not start automatically as describe
Thanks
kent, hi!
Experiencing the same problem.
No understanding of how to set up a task sequence.
Do as mandatory or not?
Use the task “all collection” or only on OSD windows xxx
tutti & co
Coretech Blog » Blog Archive » Coretech HTA
[…] have read here, here, here, here and here for HTA .I used HTA available here and modified and used in my task […]
[…] have read here, here, here, here and here for HTA .I used HTA available here and modified and used in my task […]
[…] have read here, here, here, here and here for HTA .I used HTA available here and modified and used in my task […]
Hi,
I’m having issues installing the HTA exe, my SCCM installation is on the D drive and it fails at creating boot. I tried copying the boot.wim to the location in the log file but still fails. Is it possible to get a copy of the source code or is there a workaround?
Cheers,
Euan
There is no issue having ConfigMgr installed on the d: drive. I do that all the time. Have you deleted the OSD collections before running the install again? And do you have the correct hta account?
Doesn’t look like it gets far enough to add the OSD collections.
Could not copy Boot Image from: “C:Program FilesMicrosoft Configuration Manager\OSDbooti386boot.wim” to: “\servernameSCCM_Sources$OSDHTABootImageboot.wim”. Warning: Could not find a part of the path ‘C:Program FilesMicrosoft Configuration Manager\OSDbooti386boot.wim’.
When trying to import the task sequence I get an error “cannot validate a dependency to Package PS100002”. I know I don’t have that package in SCCM but how can I import it anyway and then change the reference to the package later?
It’s the boot image, the image file and the mdt packages. Just replace the steps in the task sequence with own packages.
[…] have read here, here, here, here and here for HTA .I used HTA available here and modified and used in my task […]
[…] have read here, here, here, here and here for HTA .I used HTA available here and modified and used in my task […]
I consistently get an error, “It doesn’t seem that you have a working connection to the central site server.” I have enabled command line support on the boot image and I am able to use the NET USE command to map the HTA path. I am lead to believe that there might be an issue with my config. Please assist me, thanks in advance.
The SA account that was created required permissions to the share even though I had set another SA account to be the “Network Access Account”
I wonder the following,
1. Depending on the role one choose, could one get a computername prefix depending on this? If I choose Windows 7 I would get a specific prefix that I have created, the ability to connect the role with a prefix.
2. Is there a way to use the computers serialnumber as the computername, either with or without a prefix.
3. Is there a way to to arrange the sort order of the roles without changing the folder names?
4. I see that you have a OSD_Roles_Default would it be possible to also set a OSD_Selections_Default?
TIA
Anderz
I forgot 2 more questions…
5. Is there a way to also set the “Select Role Tpe” with a default value, OSD_Roles_Type_Default?
6. Is it possible to run this HTA with a 64-bits WinPE?
TIA
Anderz
Yes, you can set the following in hta_main
ComputerName_Serial_UseText
True
then make sure the following exists in the naming scheme.
;T7 or any number u need.
Getting “ERROR: Creating HTA User” during the installer.
Any ideas as to what is causing this and can this be fixed post-install as it seems to have installed most requirements correctly.
Thanks
Getting the same error as Kev S. Above I was wondering if any one knows how to address it.
Start: Creating HTA User. BackgroundWorker 5/12/2015 3:53:11 PM 1 (0x0001)
Could not add HTA User. Error: Generic failure CreateHTAUser 5/12/2015 3:53:11 PM 1 (0x0001)
Failed: Creating HTA User. BackgroundWorker 5/12/2015 3:53:11 PM 1 (0x0001)
Installation Failed. Error: Creating HTA User Installer 5/12/2015 3:53:11 PM 1 (0x0001)
Hello,
I have it all setup now but one thing is confusing: Should I still get the task sequence wizard displaying all the deployed TS’s? Isn’t that controlled using the HTA when I select the “Windows 7” and “Developer” buttons?
Thanks for the HTA.
What steps do we need to perform to get this to run on x64 boot immage? we are getting an error “the subsystem needed to support the image type is not present”
Hey
Is it possible to show roles based on computer model?
Michael
Is this solution open source?
Hi,
I recently found your tool named Coretech HTA.
It’ really a great tool but I wonder if there is a way to use it with a x64 Boot Image ?
Another question is how to force showing Additional Selections in Coratech HTA page ?
Is there a specific variable to define so the administrator does not need to select the Show button to choose the Language to deploy.
And finally, is there a way to hide ths USMT option in the Additional selections?
Best regards,
Hi,
I recently found your tool named Coretech HTA.
It’ really a great tool but I wonder if there is a way to use it with a x64 Boot Image ?
Another question is how to force showing Additional Selections in Coratech HTA page ?
Is there a specific variable to define so the administrator does not need to select the Show button to choose the Language to deploy.
Or is it possible to set this option mandatory?
And finally, is there a way to hide the USMT option in the Additional selections?
Best regards,
Download does not exist , please share link for download