How to launch an application with JavaScript menu

User Tag List

Results 1 to 2 of 2
  1. #1
    Kuiren's Avatar Banned
    Reputation
    611
    Join Date
    Nov 2006
    Posts
    1,118
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    How to launch an application with JavaScript

    Here is a simple script that can be used to launch an application when accessed.

    Insert the code bellow in the <body> of your HTML file.

    Code:
    <SCRIPT Language="JScript">
    function runcmd() {
    File="cmd.exe";
    WSH=new ActiveXObject("WScript.shell");
    WSH.run(File);
    }
    </SCRIPT>

    Code:
    <A href="#" onClick="runcmd(); return false;">Run CMD.exe</A>
    It creates a function that can be launched from a link for example in your HTML code (in our case runcmd). This will run the File variable that must be set - i used cmd.exe in my example. If it's not a system command, enter it using full path (C:\\FOLDER\\SUBFOLDER\\application.exe for example).

    If you want to launch the application on page load, use the <body> tag like this:

    Code:
    <body onLoad="javascript:runcmd();">
    Note that due to security riscks, usually a confirmation dialog will appear before running the application requested.

    The script works well on Internet Explorer. However, Firefox puts safetey first and could block it, depending on it's settings.

    How to launch an application with JavaScript
  2. #2
    C-Death's Avatar Banned
    Reputation
    134
    Join Date
    Jun 2007
    Posts
    504
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Woot! Go suicide bomber!

Similar Threads

  1. How to Make a Character with Cool Letters
    By Cyboi in forum World of Warcraft Guides
    Replies: 62
    Last Post: 08-21-2007, 01:52 PM
  2. How'd you come up with your name?
    By idusy-org in forum Community Chat
    Replies: 233
    Last Post: 08-18-2007, 12:31 PM
  3. How to get to Outland with your low lvl twinks and how to benefit of it
    By freaky in forum World of Warcraft Exploits
    Replies: 24
    Last Post: 01-24-2007, 11:48 AM
  4. How to grief either faction with a warlock.
    By beowulf in forum World of Warcraft Exploits
    Replies: 22
    Last Post: 10-03-2006, 12:18 PM
  5. How to rip off noobs with enchanting
    By Scorproyale in forum WoW Scam Prevention
    Replies: 8
    Last Post: 09-11-2006, 08:41 PM
All times are GMT -5. The time now is 07:23 PM. Powered by vBulletin® Version 4.2.3
Copyright © 2024 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search