Differences between MenuBox in HTML Mode and HTML Applications (HTAs)
TOPIC
Q: What are the differences between MenuBox in HTML Mode and HTML Applications (HTAs)?
DISCUSSION
A: MenuBox HTML applications are similar in concept and goals to HTA applications. Both can be used to open "chromeless" browser windows. MenuBox however offers a wider set of features via its extended document object model (DOM), while remaining compatible with more versions of Windows than those supported by HTA applications.
What's Similar
- Both HTA and MenuBox HTML applications use the latest Microsoft HTML engine that is available on the system (as used by Internet Explorer, and independently of the default browser chosen by the user).
- Both HTA content and MenuBox run as a trusted application.
What's Different
- HTA defines the initial properties of the container window in the HTA:APPLICATION element inside the first HTML file, whereas with MenuBox the initial properties are defined in a separate .ini file.
- In HTA, custom properties and methods are accessed via the ID specified in the HTA:APPLICATION element. In MenuBox, custom properties and methods can be accessed either via the Window.External object, or via an optional JavaScript layer provided with MenuBox, which includes fallback functionality when testing in a browser or authoring environment.
Where MenuBox Excels
- The MenuBox extended DOM offers a richer set of features compared to the HTA environment, with special attention to the needs of AutoRun, setup, launcher and kiosk applications. For example, MenuBox includes methods to differentiate between x86 and x64 architectures, to set and read nonvolatile variables, to easily locate and work from read-only media, etc.
- HTA provides no means for conditional logic or custom actions before the window is opened, whereas these can be specified and applied via the MenuBox .ini file (e.g. for automatic installation of a plugin).
- HTA requires Internet Explorer 5 or later, while MenuBox runs on Windows 98 or higher, or any version of Windows with Internet Explorer 4 or later. MenuBox additionally offers failsafe fallback options for even older systems.
- With MenuBox, Web and local HTML links intended to open in a new browser window (e.g. via target="_blank", i.e. outside of the MenuBox or HTA container) open with the correct default browser (e.g. Firefox, Opera, Chrome, etc.), which is the behavior expected by the user. This is not the case with HTA containers, where an Internet Explorer browser session is opened even if a different default browser is set.
- HTA "workarounds" such as ActiveXObject("Shell.Application"), which tend to be more complex to write and maintain compared to HTML and JavaScript, are generally not required for HTML code running in MenuBox.
- HTA's approach to elevating privileges is to generically lift restrictions that are usually in place in an HTML context. In MenuBox, HTML behavior is not modified (compared to Internet Explorer), but additional dedicated functions (e.g. to invoke an external application, to close the window, etc.) are available via the extended DOM. By looking at the extended DOM you can understand at a glance what has been added.
- HTA functionality may have been disabled as a response to known security vulnerabilities (e.g. see "Microsoft Security Bulletin MS05-016"). HTA applications will not start on these systems.
ARTICLE INFORMATION
Article ID: | 13-198 |
---|---|
Platform: | Windows |
Products: | MenuBox |
Additional Keywords: | None |
Last Update: | 2009-10-06 |
It is safe to link to this page.