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.

2
  • 2
    I'm not certain if this is exactly what you're after, but it's a step in the right direction: stackoverflow.com/questions/15351508/… Commented Apr 16, 2014 at 8:30
  • Use a custom protocol handler. Here is the microsoft documentation Commented Apr 16, 2014 at 11:03

1 Answer 1

-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>
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.