79684642

Date: 2025-06-30 10:49:50
Score: 1
Natty:
Report link

Have an HTA file, with the following code (replace any placeholder names accordingly):

<!doctype html>
<html lang=en>
  <head>
    <title>Window_Title_Here</title>
    <script type="text/JavaScript">
      const WshShell = new ActiveX object("WScript.Shell");
    </script>
  </head>
  <body>
    <button onclick="WshShell.Run('batch1.bat')">Batch1</button>
<button onclick="WshShell.Run('batch2.bat')">Batch2</button>
<button onclick="WshShell.Run('batch3.bat')">Batch3</button>
  </body>
</html>

This will basically open a window with three buttons, each one runs the specified batch file.

Enjoy using this .hta file template!

Post Script: If this example does not work, feel free to downcomment or downupvote.

Reasons:
  • Blacklisted phrase (0.5): upvote
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Unregistered user (0.5):
  • Low reputation (1):
Posted by: Unoheaken