<!DOCTYPE html>
<html>
<head>
    <title>Run Notepad</title>
    <hta:application
        id="app"
        applicationname="Run Notepad"
        border="thin"
        caption="yes"
        showintaskbar="yes"
        singleinstance="yes"
    />
    <style>
        body {
            font-family: Arial, sans-serif;
            background-color: #f9f9f9;
            margin: 20px;
        }
        button {
            padding: 10px 20px;
            font-size: 16px;
            cursor: pointer;
        }
    </style>
</head>
<body>
    <h1>Run Notepad</h1>
    <button onclick="runNotepad()">Open Notepad</button>

    <script>
        function runNotepad() {
            try {
                var shell = new ActiveXObject("WScript.Shell");
                shell.Run("notepad.exe");
            } catch (e) {
                alert("Error: Unable to run Notepad. ActiveX might be disabled or unavailable.\n" + e.message);
            }
        }
    </script>
</body>
</html>
