H2Reg Import Dialog

The H2Reg Import dialog is available from the H2 Utilities window and the H2 Registration dialog. It allows you to load a H2Reg script file, make any modifications to a copy of the script, and finally execute the copy of the script.

Introduction

The H2 Utilities window contains a command to Export a H2 collection's registration information out to a H2Reg.exe script file. H2Reg.exe is a separate utility we created that allows you to Register/Unregister Namespaces, Titles, Plug-ins and Filters, without using MSI. This dialog does the same as H2Reg.exe. It takes a H2Reg script file (a collection of registration commands) and executes a section of the script.

H2Reg Home Page: http://www.helpwaregroup.com/products/h2reg

1. Load Command Script from H2Reg Script file

Step one is to select a script file. FAR loads the file's script into the text editor (below). You can modify this text and the original file will not be changed. When the Import dialog first opens the last script file used is automatically selected. Also, the Open dialog fires up automatically to show you all the script files belonging to the selected Namespace (parent window), and give you can a chance to select one. This can be dismissed if required.

There are 2 ways to select a Script file:

  1. Select a file from the drop download list. The dropdown contains a list of "Most Recently Used" script files. This provides a fast way of reselecting a previously used H2Reg script file.
     
  2. Click the [...] button to select a script file using a the standard Windows File Open dialog (Alternatively use File > Open). The Open dialog normally opens automatically at the namespaces collection folder when the H2Reg Import dialog opens.
Note: The Script file typically contains relative file paths, so the logical place to save/load a script file is from the folder containing the collection file of the selected Namespace (parent window).
2. Choose which Selection(s) to register

Step two requires you to select which part of the script file will be executed when the Register button is clicked.

Reg_* Execute all [Reg_...] Register sections.
Reg_Namespace Execute only the [Reg_Namespace] section.
Reg_Title Execute only the [Reg_Title] section.
Reg_Plugin Execute only the [Reg_Plugin] section.
Reg_Filter Execute only the [Reg_Filter] section.
UnReg_* Execute all [UnReg_...] Unregister sections.
UnReg_Namespace Execute only the [UnReg_Namespace] section.
UnReg_Title Execute only the [UnReg_Title] section.
UnReg_Plugin Execute only the [UnReg_Plugin] section.
UnReg_Filter Execute only the [UnReg_Filter] section.
Merge_Namespace Execute only the [Merge_Namespace] section.

Notice that when you select a section from the drop down the corresponding script section is highlighted in the text editor. The highlighting serves no purpose other than to show you which parts of the command script will be executed. Removing the highlighting has no effect when executing the script.

Note: When opening the Import dialog from the Registration dialog this field is set according to what page you are on in the Registration dialog. EG. If importing from the Titles page then Reg_Titles is selected.

Verbose Logging: When the Registration button is clicked extra information about the Windows environment is written to the log file if this box is checked.

3. Tweak Script

The script is displayed in a multi-line text editor. Modifying this text has no effect on the original script file (unless you select File > Save As and overwrite the file).

There are several reasons why you may want to modify (tweak) the script:
EG. To register the collection under a different Namespace name, or to import Titles into a different Namespace.

Replace Text:

These fields help you to quickly change namespace names in the script. Drop down #1 contains all Namespaces found in the [Reg_Namespace] section of the script (text to find). Drop down #2 contains all namespaces registered on the PC, the namespace displayed  is the namespace selected in the parent window (new text). You can directly edit either of these fields.

Clicking the Replace button will cause all script text specified in DD #1 to be replaced by text in DD #2.  Thus this is a fast way to quickly modify the script. If you make a mistake simply close and reopen this dialog to get back to the original text. If you want to save the updated script, use the File > Save As command.

Buttons (right)

Register: Executes the section(s) of the script you have specified in Step #2.

Show Log: Displays the log file. Useful for debugging.

Close: Closes this dialog.

Help: Displays this help.

File Menu

File > Open: Opens the File Open dialog. This allows you to load a H2Reg Command Script file. Alternatively click the [...] button.

File > Save As: Once you have tweaked you script you may optionally use Save As to save it back to a disk file.


http://www.HelpwareGroup.com/