Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

HTML link to launch cmd file

Posted on 2014-04-28
5
Medium Priority
?
371 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 1000 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 34

Assisted Solution

by:Big Monty
Big Monty earned 1000 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 34

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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
Q&A with Course Creator, Mark Lassoff, on the importance of HTML5 in the career of a modern-day developer.
In this Micro Tutorial viewers will learn how to create navigation buttons that change on rollover, using CSS (Continuation of the CSS Image Sprite tutorial) Create a parent ID for all the list items       - Specify position: absolute and display: block…
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…

916 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