Javascript to open application on client's machine

Long time back I was wondering if some how I will be able to open any application through my website on client's machine. Finally I came to know that yes it is possible and I will end up with this code.

Following code will open up notepad on client's machine. Before opening the file it will prompt the user, if the user accepts then it will opened. As of now it worked on windows with explorer only.

     function go()
w = new ActiveXObject("WScript.Shell");
return true;

          Run Notepad (Window with explorer only)
<input type="button" value="Go" onClick="return go()">


  • what credential does it need?is it always enabled?
    what about security notifications?

  • hello,

    your code creates a task on client machine but than i have to manually go there and tick the "Run only if logged on" check box to actually run it..

    is there a way to do this ticking programatically??? please help.....

  • Great! Now I'll continue my search to find a way to open link files (.txt) with notepad

  • Can it be used to open any other application like adobe or some other application? I am trying to open one of the Software tool through this and it is not working.

    The exact address of the .exe file is Program Files/tools/mmt.exe and it is not working.

    Any idea how can we make it work?

    Its working fine for notepad and cmd line.

  • I am trying to prepare a JAVASCRIPT to run any .exe from remote server using any browser(like IE, FF,Chrome). My script is working fine in IE.
    So, do have any idea how to prepare a single JAVASCRIPT to execute any .exe from remote server using any browser?

  • How can I use javascript to open specific program, say for example, Outlook. Here are specific requirements.

    1. Check if outlook is already open, then get it, else open it.

    2. Create a new mail with server supplied details (to, subject, body, attachment) and use client setting for getting signature.

    3. The mail should be sent from Client's outlook machine.

    I hope you can help me out.

    Thanks in advance!

  • @Nil

    You can try using this.

    Send email

    It should bring up New Email in outlook with pre-populated information in the fields.

    Hope it will help.

  • Would love to always find out updated outstanding blog !

  • I’d must verify with you here. Which isn’t
    something I often do! I enjoy studying a publish that can make people
    think. Also, thanks for permitting me to remark!

  • I just like that the efforts you have put in this, regards for all that the great articles .

  • I’ve viewed some different blog posts with regards to this topic, and I must
    state that yours shows the most insight. Thanks a ton for expressing your opinions
    with everyone here.

Comments have been disabled for this content.