Phones forum

General discussion

Run any exe using JavaScript in WM6!

by vinayak17 / June 8, 2010 3:31 PM PDT

Hello all,

I am trying to write some code (using HTML and JavaScript) which runs some exe on a button click. I accomplished the same using code below on WIN XP desktop browsers, but when I run the same code in WM 6 browser nothing happens....niether I get any error message nor any indication of something going wrong.

Can somebody here just confirm that an exe can be executed on WM6 using JavaScript ?

My current code which works on dektops:

<script language="JavaScript" type="text/javascript">
MyObject = new ActiveXObject( "WScript.Shell" );
function RunExe()
MyObject.Run("\Program Files\Games\Pool\Pool.exe") ;
<h1>Run a Program</h1>
This script launch the file any Exe File<p>
<button onclick="RunExe()">Run Exe File</button>


Thanks in advance for your kind consideration.

Awaiting help at the earliest.

As ever,
Vinayak Kadam

Post a reply
Discussion is locked
You are posting a reply to: Run any exe using JavaScript in WM6!
The posting of advertisements, profanity, or personal attacks is prohibited. Please refer to our CNET Forums policies for details. All submitted content is subject to our Terms of Use.
Track this discussion and email me when there are updates

If you're asking for technical help, please be sure to include all your system info, including operating system, model number, and any other specifics related to the problem. Also please exercise your best judgment when posting in the forums--revealing personal information such as your e-mail address, telephone number, and address is not recommended.

You are reporting the following post: Run any exe using JavaScript in WM6!
This post has been flagged and will be reviewed by our staff. Thank you for helping us maintain CNET's great community.
Sorry, there was a problem flagging this post. Please try again now or at a later time.
If you believe this post is offensive or violates the CNET Forums' Usage policies, you can report it below (this will not automatically remove the post). Once reported, our moderators will be notified and the post will be reviewed.
Collapse -
Your discussion's title.
by R. Proffitt Forum moderator / June 8, 2010 11:09 PM PDT

Looked like you were showing a solution. Let me share the one I used in C Sharp ->

As to your script, you know that such launching is now considered a security risk and should no longer work except on very old insecure systems. There is no plan to allow what you asked ever again.

Collapse -
In addition...
by John.Wilkinson / June 10, 2010 6:01 AM PDT

1.) ActiveX is proprietary to Microsoft and only works in IE; Firefox, Safari, Chrome, Opera, etc. do not natively support it, and even Microsoft is reducing its use in Internet Explorer.

2.) Files and directories can be moved, may not exist, and are spelled differently based on the user's language, so a hard-coded script like that will fail quite often.

Perhaps you could just tell the user to launch the desired program?


Collapse -
Need confirmation?
by vinayak17 / June 10, 2010 1:45 PM PDT
In reply to: In addition...

Thanks John,

My target device is Windows Mobile 5 and above. Can you just confirm that an exe file can be executed from JavaScript in IE on WM5 and how ?

Collapse -
I can confirm
by R. Proffitt Forum moderator / June 10, 2010 8:58 PM PDT
In reply to: Need confirmation?

That on WM 6.5 it fails. Again, this is not supposed to work any longer as it is considered a security risk.

If it works, it's just a sign that there is a security issue.

Collapse -
Have you found any solution?
by SAL44DOR / November 8, 2012 4:04 AM PST
In reply to: Need confirmation?

Hi Vinayak Kadam
I'm looking for the same thing
Have you found any solutions that you can share with us?


Collapse -
Did you catch that it's no longer supposed to work?
by R. Proffitt Forum moderator / November 8, 2012 4:21 AM PST

I can only guess that you didn't find that out yet.

Popular Forums
Computer Help 51,224 discussions
Computer Newbies 10,453 discussions
Laptops 20,090 discussions
Security 30,722 discussions
TVs & Home Theaters 20,937 discussions
Windows 10 1,295 discussions
Phones 16,252 discussions
Windows 7 7,684 discussions
Networking & Wireless 15,215 discussions

Finding the best 360 camera

GoPro, Pixpro, or Ricoh?

You can spend hundreds or even thousands of dollars on a 360-degree camera. We tested three of them to find out what kind of quality and ease of use you can expect at each price point.