Skip to content

Instantly share code, notes, and snippets.

@npocmaka
Created October 22, 2015 11:19
Show Gist options
  • Save npocmaka/7256cf3654a83b4335c9 to your computer and use it in GitHub Desktop.
Save npocmaka/7256cf3654a83b4335c9 to your computer and use it in GitHub Desktop.
<!-- :
@echo off
start "" mshta.exe "%~f0"
exit /b
:: mshta is not sensitive on file extensions so it will process a file with .bat extension
:: the line <!-- : starts an XML/HTML comment but in batch
:: it will be interpretted as :<!-- (because of redirection priority) - which is a valid comment in batch files
::
:: source http://www.dostips.com/forum/viewtopic.php?p=33963
:;
-->
<html>
<head><title>HTA window</title></head>
<body><h1>Hello, world!</h1></body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment