Skip to content

Instantly share code, notes, and snippets.

@soiqualang
Forked from drewchapin/HTML Application.hta
Created January 27, 2021 07:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save soiqualang/e2fc72b98b54640bc4dd0afcad057944 to your computer and use it in GitHub Desktop.
Save soiqualang/e2fc72b98b54640bc4dd0afcad057944 to your computer and use it in GitHub Desktop.
Template for an HTML Application file (.hta), add to C:\Windows\ShellNew, and add ShellNew\Filename="HTML Application.hta" to .hta HKCR key.
<html>
<head>
<!--
@tag hta:application
@attribute ApplicationName Sets the name of the HTA.
@attribute Border [Thick]|Thin|None
@attribute BorderStyle [Normal]|Raised|Sunken|Complex|Static
@attribute Caption [Yes]|No
@attribute ContextMenu [Yes]|No
@attribute Icon Path/To/Icon.ico
@attribute MaximizeButton [Yes]|No
@attribute MinimizeButton [Yes]|No
@attribute Navigable [Yes]|No
@attribute Scroll [Auto]|Yes|No
@attribute Selection [Yes]|No
@attribute ShowInTaskbar [Yes]|No
@attribute SingleInstance [Yes]|No
@attribute SysMenu [Yes]|No (Setting to No will remove close button)
@attribute WindowsState [Normal]|Minimize|Maximize
-->
<hta:application
ApplicationName="Application Name"
Border="Thin"
BorderStyle="Static"
Caption="Yes"
ContextMenu="No"
MaximizeButton="No"
MinimizeButton="No"
Navigable="No"
Scroll="No"
Selection="No"
ShowInTaskbar="Yes"
SingleInstance="Yes"
SysMenu="Yes"
WindowState="Normal"
>
<title>Application Title</title>
<style type="text/css">
body {
font-size: 11pt;
font-family: "Segoe UI", Calibri, Arial, Sans-Serif;
}
</style>
<script language="VBScript">
Window.ResizeTo 400,300
</script>
</head>
<body>
<p>Hello world!</p>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment