Phones

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:

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

</body>
</html>

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 -> http://www.codeproject.com/KB/cs/howtolaunchprocess.aspx

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.
Bob

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?

John

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.
Bob

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?

Thanks

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
icon
Computer Help 47,885 discussions
icon
Computer Newbies 10,322 discussions
icon
iPhones, iPods, & iPads 3,188 discussions
icon
Security 30,333 discussions
icon
TVs & Home Theaters 20,177 discussions
icon
HDTV Picture Setting 1,932 discussions
icon
Phones 15,713 discussions
icon
Windows 7 6,210 discussions
icon
Networking & Wireless 14,510 discussions

Tech Tip

Tired of your tricky Wi-Fi password?

Stop trying to memorize a complicated sequence of numbers and letters. Learn how to change the default password.