Solved

Can you launch the win app from a javaScript?

Posted on 2006-11-27
6
526 Views
Last Modified: 2007-12-19
Can you launch the local win app from a javaScript?

0
Comment
Question by:chuang4630
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
6 Comments
 
LVL 54

Expert Comment

by:b0lsc0tt
ID: 18021448
chuang4630,

What do you mean "the" local win app?  What specific app are you referring to?  In general Javascript can't be used to "run" programs on the computer because of browser limitations and security.  The browser doesn't have that type of access to the computer's files.  However if this app has a plugin or some similar connection to the browser then that can be used to start the application (i.e. Windows media player).  This isn't specifically done with javascript but with an object tag or using similar html.

Let me know if you have any questions or need more information.

b0lsc0tt
0
 
LVL 17

Accepted Solution

by:
cem_turk earned 400 total points
ID: 18021972
you should use activex for that
0
 
LVL 25

Assisted Solution

by:devic
devic earned 100 total points
ID: 18023709

JS example:
//====================================================
<script>
   var ws = new ActiveXObject("WScript.Shell");
   ws.Exec("c:\\Windows\\Notepad.exe")
</script>


VBS example:
//====================================================
<script language="VBScript">
    Set shell = CreateObject("WScript.Shell")
      shell.Run("c:\WINDOWS\Notepad.exe ")
</script>
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 1

Author Comment

by:chuang4630
ID: 18029020
Error while using the script above:

Automation server can't create object.


Anyone knows why?
0
 
LVL 25

Expert Comment

by:devic
ID: 18029140
0
 
LVL 1

Author Comment

by:chuang4630
ID: 18070201
LaunchinIE ActiveX did the trick.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Article by: DanRollins
This article describes a JavaScript program that creates a maze made of hexagonal cells.  In Part 2 (http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/A_7850-Hex-Maze-Part-2.html), we'll extend the program by adding a depth-…
This article discusses the difference between strict equality operator and equality operator in JavaScript. The Need: Because JavaScript performs an implicit type conversion when performing comparisons, we have to take this into account when wri…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

740 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question