How to Convert HTA to EXE
With an HTML Application (HTA), it is possible to create exe applications using HTML and DHTML files.
An HTA file can be made from a normal HTML file by simply changing its file extension to .hta. HTA files have more privileges than html files. They can display menus, icons, toolbars, and title information created by Web developers.
Unfortunately, HTA files have a drawback; the content of HTA files can be viewed and modified. You can solve this problem by converting HTA into EXE application.
How to convert HTA to EXE:
- Select the Project > Build command in ExeScript.
- Specify the name of exe file and the location where the exe file should be saved.
- Click the Save button.
ExeScript will convert HTA to EXE and inform you about the result.
Most HTA scripts use external resources. For example, the following simple script uses the file simple.ico as the application icon:
<HTML>
<HEAD>
<TITLE>HTA Demo</TITLE>
<HTA:APPLICATION ID="oHTA"
APPLICATIONNAME="myApp"
BORDER="thin"
BORDERSTYLE="normal"
CAPTION="yes"
ICON="simple.ico"
MAXIMIZEBUTTON="yes"
MINIMIZEBUTTON="yes"
SHOWINTASKBAR="no"
SINGLEINSTANCE="no"
SYSMENU="yes"
VERSION="1.0"
WINDOWSTATE="maximize"/>
SCRIPT>
/SCRIPT>
</HEAD>
<BODY SCROLL="no">
<PRE ID=oPre> </PRE>
</BODY>
</HTML>
You can convert this HTA to EXE, but you must make sure that the file simple.ico is located in the folder specified in the Work Directory property in ExeScript.
There are two ways to accomplish this.
- Specify Work Directory = Script Directory and save simple.ico to the folder with the EXE file.
- Add simple.ico to the Resource View pane in ExeScript. ExeScript will include simple.ico in the exe file. It will always be located in the same folder as the main script and will not depend on the Work Directory property.
See also:
Convert Script to EXE
Convert BAT to EXE
Convert VBS to EXE
Convert WSH to EXE
Convert JS to EXE
Batch File Commands
|