/    Sign up×
Community /Pin to ProfileBookmark

Launch application in Javascript

In DOS, if I write a batch file to launch notepad it is [B]START notepad.exe[/B]
How do I launch an application using javascript?

thanks

to post a comment
JavaScript

5 Comments(s)

Copy linkTweet thisAlerts:
@ReisMar 25.2010 — you cant...
Copy linkTweet thisAlerts:
@FangMar 26.2010 — Only in IE.var WshShell = new ActiveXObject("WScript.Shell");
var oExec = WshShell.Exec("notepad.exe");
Copy linkTweet thisAlerts:
@locbtranauthorMar 29.2010 — Only in IE.var WshShell = new ActiveXObject("WScript.Shell");
var oExec = WshShell.Exec("notepad.exe");
[/QUOTE]


This works great but if I was to launch other applications besides notepad or calc, it does not work.

[CODE]
var WshShell = new ActiveXObject("WScript.Shell");
WshShell.Exec("d:hjsplit.exe");
[/CODE]


Any comments or suggestions is greatly
Copy linkTweet thisAlerts:
@YelgnidrocMar 29.2010 — If you could do what you want you could wreak havoc!!!
Copy linkTweet thisAlerts:
@FangMar 30.2010 — Read up on the Windows Script Host

@[B]Yelgnidroc[/B] These scripts require user confirmation; no need to worry, they are blocked by default.
×

Success!

Help @locbtran spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.5,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,

tipper: @Samric24,
tipped: article
amount: 1000 SATS,
)...