3

I am looking for a way to make the client machine execute some command line in the command prompt (cmd) from a web page (intranet application).

I guess (and hope) this cannot be done by browser standards. But assuming I have full access to the clients' machines and can setup everything I need on them - Is there a way to make Internet Explorer trigger a launch of cmd and execute a given command? So I could then include hyperlinks or javascript to access it like, for example, this:

<a href="cmd:C\Program Files\...">Click Me</a>

executeCmd('C:\\Program Files\\...');

If there is no easy way to configure something like this, I'd be very thankful for workarounds or different approaches to trigger a command from a web page.

Ashley Medway
  • 7,151
  • 7
  • 49
  • 71
Dennis
  • 14,210
  • 2
  • 34
  • 54
  • 2
    I'm not certain if this is _exactly_ what you're after, but it's a step in the right direction: http://stackoverflow.com/questions/15351508/using-a-wscript-shell-activex-to-execute-a-command-line – Matt Apr 16 '14 at 08:30
  • Use a custom protocol handler. [Here](http://msdn.microsoft.com/en-us/library/aa767914%28v=vs.85%29.aspx) is the microsoft documentation – MC ND Apr 16 '14 at 11:03

1 Answers1

-1

Instead of using

<a href="cmd:C\Program Files\...">Click Me</a>

executeCmd('C:\\Program Files\\...');

Use this

<a href="file:\\C:\Program Files\...">Click Me</a>
Patton Pierce
  • 317
  • 1
  • 2
  • 14