Solved

HTML link to launch cmd file

Posted on 2014-04-28
5
340 Views
Last Modified: 2014-04-28
Hi Everyone,

I'm creating a simple html page. On the page I've got a hyperlink, pointing to a command file (.cmd). I'm running Windows 7.

When I click the link, it asks me to 'save the file or launch it'. How can I bypass this question and just launch the file?
0
Comment
Question by:SvenIA
  • 2
  • 2
5 Comments
 
LVL 22

Accepted Solution

by:
plusone3055 earned 250 total points
ID: 40027202
simple solution is launch the .cmd file through a .bat  or .vbs  script and have the URL link to the .bat or .vbs script
0
 
LVL 33

Assisted Solution

by:Big Monty
Big Monty earned 250 total points
ID: 40027365
you cannot launch a command file on the users local file, the most you can do is prompt them to download the file (which you have done) and have them launch it manually. to do it automatically would be a huge security risk,

think about it, would you want to visit a site that could run commands on your local computer?

if you're trying to run the command file on the server, plusobe's solution would be the easiest.
0
 
LVL 22

Expert Comment

by:plusone3055
ID: 40027399
Monty

Agreed
my thought was that this was a local server task :)
0
 
LVL 33

Expert Comment

by:Big Monty
ID: 40027409
i'm hoping it is, be a lot easier to resolve :)
0
 
LVL 7

Author Closing Comment

by:SvenIA
ID: 40027424
Thanks guys. There's no server involved actually. I'm just trying to create a small html dashboard for someone who isn't very handy with a pc.

My idea was to create a simple html page with some buttons, to launch some scripts and applications.
0

Featured Post

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

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

SASS allows you to treat your CSS code in a more OOP way. Let's have a look on how you can structure your code in order for it to be easily maintained and reused.
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
In this tutorial viewers will learn how to style elements, such a divs, with a "drop shadow" effect using the CSS box-shadow property Start with a normal styled element, such as a div.: In the element's style, type the box shadow property: "box-shad…
In this tutorial viewers will learn how to code links for mobile sites that, once clicked, send a call or text to a specified number. For a telephone link (once clicked, calls a number), begin with a normal "<a href=" link tag. For the href, specify…

776 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