SoftwareCentral · SoftwareCentral HTA

Design HTA

The HTA designer decides what the SoftwareCentral HTA shows when a computer starts it: the logo, the labels, the fields and the buttons. You drag elements into two columns, set the HTA options, and save the script.

Drag and drop Three mandatory elements Save writes the HTA script

1 Open the designer

To start designing the HTA, go to the Settings menu, then Create HTA. The designer opens. If you already created an HTA, it is shown in the middle of the designer.

Only with Dynamic HTA The menu item for the designer is shown only when the Dynamic HTA module is enabled.
HTA designer: Add elements list on the left, COLUMN 1 and COLUMN 2 in the middle with Logo, Label, Empty, Extender, Computer name and MAC Address elements, and the HTA settings on the right with Buttons, Template, Authentication Type, Column size, Preview Size, Secure Boot, Restore and Import, and Save and Download HTA script at the bottom.
The designer: Add elements on the left, the two columns in the middle, and the HTA settings on the right.
  • Add elements (left): the elements you can add to the HTA. Drag an element from here into column 1 or column 2.
  • Middle: the two columns. Only the elements in these two columns are in the HTA.
  • Right: the HTA settings, with Restore and Import above Save and Download HTA script.

2 Import HTA

You can import a premade HTA from an XML file.

The file must be a SoftwareCentral HTA XML file, and all custom variables in the HTA must exist in the system. Press Import and choose the file. A warning says that the existing HTA will be overwritten.

The old HTA is replaced When a new HTA is imported, the old one is removed. This designer has no Export button, so keep a copy of the current layout yourself before you import.

3 The standard HTA and Restore

SoftwareCentral has a standard HTA. You can put it back with Restore.

Press Restore to replace the current HTA with the SoftwareCentral standard HTA. The current HTA is removed. Before you press it, the warning text says that the existing HTA will be overwritten by the default HTA.

Import Computer window of the HTA preview, with the fields Computer Template, Computer Naming Series, Computer Name, MAC Address, OS Advertisement, Software Group and User Device Affinity, and the buttons Import, Login and Close.
The standard HTA as the Preview window shows it, with the Import, Login and Close buttons.

The standard HTA:

SettingStandard value
Authentication TypeAnonymous authentication
ButtonsClose and Login are shown, and the login window opens when the HTA opens
TemplateUse mandatory settings and Hide lock variables are ticked
Column size40 % and 60 %
Preview Size500 high and 500 wide

4 HTA settings

The settings are in the right-hand panel. They apply to the whole HTA.

HTA settings panel: Buttons with Close, Login and Import ticked, Keep Old Software and Open login window when HTA opens; Template with Use mandatory settings and Hide lock variables; Authentication Type set to Anonymous authentication with User Name and Password; Column size; Preview Size; Support Secure Boot; Restore and Import HTA; Save and Download HTA script.
The HTA settings panel as it is on the test site, with Anonymous authentication selected.

Buttons

There are two optional buttons, beside the Import button, which is always shown.

  • Close closes the HTA and cancels the import of the unknown computer. An import cannot be cancelled after the Import button in the HTA is pressed.
  • Login opens a login window, where the Windows user can be changed. Use it with anonymous authentication, or when a user started the HTA with the wrong account.
  • Open login window when HTA opens is available only when Login is ticked. It opens the login window as soon as the HTA starts.
  • Keep Old Software shows a Keep Old Software check box in the HTA for known computers.
Cloud installations In a cloud installation the Login and Open login window buttons are hidden, and the authentication type is fixed to Windows.

Template

In SoftwareCentral computer templates, each machine or custom variable can be set to mandatory or locked. The HTA uses these settings:

  • Use mandatory settings: a variable that is mandatory in the template is used in the HTA, and a small red star is shown beside it.
  • Hide lock variables: a locked variable is hidden in the HTA.

Authentication Type

There are two ways the HTA can authenticate the user who performs the import.

  • Windows authentication: the HTA uses the Windows user. SoftwareCentral gathers all the roles this user is a member of, and shows the templates and advertisements for those roles. This is like the normal import known from SoftwareCentral.
  • Anonymous authentication: all previously run task sequences on the client are shown. Otherwise the user must log in to get the available settings.

With anonymous authentication you can set a fixed user in User Name and Password. The HTA then uses this user to show the available task sequences and templates. The user name needs its domain: write DOMAIN\user or user@domain. When you save, the account is checked against Windows. If you leave the password box empty, the password entered earlier in this session is used.

Column size

This setting determines how wide each of the two columns is in the HTA. The two numbers must add up to 100; if they do not, the columns are set to 50 and 50 when you save or preview. If a single-column HTA is used, this setting is not used.

Preview Size

The H (height) and W (width) boxes set the size of the Preview window. An empty box or 0 means 500. Preview opens the HTA in a window and does not save it.

Saved script keeps its own size The sizes are used for the preview. In the current version, saving does not pass the Preview Size to the HTA script, so the script keeps its built-in size.

Secure Boot

Tick Support Secure Boot to support Secure Boot. Its tooltip says: If the computer is known, the HTA will close.

5 HTA elements

The elements you can add are in the Add elements list on the left.

Add elements list with Label, Empty, Extender, MSBIOSGUID, Variable Format, Keyboard, System Locale, User Locale, Time Zone, Organizational Unit and Computer Association, each with a drag handle.
The Add elements list. Each element has a drag handle on its right.

Label

A label shows a text. When you drop a label into one of the two columns, a window opens where you type the text and the tooltip.

A label element in the HTA designer with the text Label on top, the text Computer Template below it, a gear icon for settings and a red cross for removing it.
A label element. The gear icon at the top right changes the text and tooltip at any time.

Empty

An empty element is a field you can use to add empty space in the HTA.

Extender

An extender element makes the field next to it fill both fields. In the designer, the Computer template drop-down fills two fields, because an extender sits beside it.

Logo

A logo element shows the company logo. The logo path is set in Settings (Logo path); the logo must be 300 x 100 pixels. You can change it at any time.

A logo element at the top of column 1, with the text Logo, a gear icon and a red cross.
The Logo element in column 1.

Computer name

The computer name element can be checked with a regular expression. Use this if your naming convention is not supported by the automatic computer naming of SoftwareCentral.

Press the gear icon at the top right of the element. In the window that opens, type the expression, then test it: type a valid and an invalid computer name in the test box. Save keeps the expression, Cancel closes the window, and Reset removes the expression.

Other

All other elements in the list represent a computer variable or an element used in the import process.

Three mandatory elements Every HTA needs these three elements, or it cannot be saved:
  • Computer name
  • MAC address or SMBIOSGUID
  • OS advertisement

6 Working with elements

The designer is a drag and drop interface. Elements can be moved around.

Two elements in column 2 of the designer, each with a grey drag handle on the right, a red cross for removing it, and the text Empty.
The columns. Drag an element by its drag handle (the grey dots on the right) to a new position.

Only the elements in the two middle columns are in the HTA. You can preview the HTA at any time while you work, with the Preview button in the right-hand panel. The preview does not save the HTA.

To add an element, drag it from the Add elements list into column 1 or column 2. To move an element, drag it by its drag handle to the new position. A dotted line shows where the element will be dropped.

The drag handle icon: a small grid of six dots.
The drag handle, shown at the right of each element.

Removing elements

Three element types can be removed by clicking the close button in the top right corner of the element: Empty, Label and Extender.

All other elements are removed by being dragged back to the left side of the menu.

The trash icon in the header of column 2 (tooltip Clear HTA) removes all elements from the designer. Nothing is saved until you press Save.

Bottom of the HTA If an element needs to be at the bottom of the HTA, and the designer is not scrolled to the bottom, place the element in one of the columns, scroll down and slowly drag the element to its place.

7 Saving the HTA

Press Save in the lower right corner when every element is in place, and wait for the process to finish.

If an element is missing, a red message appears above the buttons, for example Invalid HTA, missing Computer Name. Add the element and press Save again.

When the save succeeds, the HTA is stored in SoftwareCentral, and the HTA script is written to the install directory of SoftwareCentral, under /Uploads/HTA, as the file HTA_Dynamic.hta. The browser also downloads the file.

Download HTA script creates the same script from the current design and downloads it, without saving the design.

8 Best practice

  • Keep the three mandatory elements. A design without the computer name, the MAC address or SMBIOSGUID, or the OS advertisement cannot be saved.
  • Use a dedicated account for a fixed user. With anonymous authentication the account is checked against Windows when you save, so use an account that is meant for the HTA and not a personal one.
  • Write down the layout before you import or restore. Import and Restore replace the current HTA, and this designer has no Export button.
  • Preview before you save. The preview shows the HTA without storing it, so you can check the buttons and fields first.
  • Tick Use mandatory settings and Hide lock variables when the HTA should follow the computer templates. Then mandatory variables are shown with a red star, and locked variables are hidden.

9 Troubleshooting

SymptomCauseWhat to do
Invalid HTA, missing MAC address or SMBIOSGUID, Computer Name, OS Advertisement (the list shows the missing elements)One or more of the three mandatory elements is not in the columns.Drag the missing element from Add elements into a column, then press Save.
User not validThe fixed user name and password did not pass the Windows check.Check the user name, the domain and the password, and save again.
No domain detected in usernameThe user name has no domain part.Write the user name as DOMAIN\user or user@domain.
Importing a file does nothing, and no message appearsThe file could not be read as a SoftwareCentral HTA XML file. The import is cancelled and the reason is not shown.Choose a SoftwareCentral HTA XML file, and make sure all custom variables in it exist in the system.

See also