Can you launch the win app from a javaScript?

Can you launch the local win app from a javaScript?

Who is Participating?

Improve company productivity with a Business Account.Sign Up

Cem TürkConnect With a Mentor Senior Software EngineerCommented:
you should use activex for that
b0lsc0ttIT ManagerCommented:

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.

devicConnect With a Mentor Commented:

JS example:
   var ws = new ActiveXObject("WScript.Shell");

VBS example:
<script language="VBScript">
    Set shell = CreateObject("WScript.Shell")
      shell.Run("c:\WINDOWS\Notepad.exe ")
Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

chuang4630Author Commented:
Error while using the script above:

Automation server can't create object.

Anyone knows why?
chuang4630Author Commented:
LaunchinIE ActiveX did the trick.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.