Thursday, February 4, 2010

How to Open Notepad through HTML File

The following program will launch the Notepad by Pressing button in web browser.This works in Internet Explorer only.

<script language="JavaScript" type="text/javascript">
function runReport()
var rep = new ActiveXObject("WScript.Shell");
rep.Run("C:\\Windows\\system32\\notepad.exe", 1, true);

<h1>Run a Program</h1>
This script launch the file >> c:\windows\system32\notepad.exe<p>
<button onclick="runReport()">Run Windows NotePad</button>


  1. this will open a new window. Can I embedd notepad in HTML page?

  2. Thanks for your comment,
    instead of embedding notepad into your html page,just use textarea tag and give more rows and columns,i think any body cannot have direct permissions to embed client side applications like notepad.exe , wordpad.exe from client system with in his own html page,html page is yours so all applications came from server or you can use java applets to develop like notepad applications and give that one to download client and make that applet application to perform notepad functionality, and applets can be easily embedded into html.

  3. this is cool thx, but for some reson it wont work :( is it compadable with notepad++???