Solved

HTML link to launch cmd file

Posted on 2014-04-28
5
337 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 32

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 32

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Introduction The Google Maps API offers various ways to draw dynamic and static maps.  Using a combination of PHP and JavaScript, you can draw active JavaScript maps that allow pan-and-zoom in the client browser window.  You can also draw "static" …
Use these top 10 tips to master the art of email signature design. Create an email signature design that will easily wow recipients, promote your brand and highlight your professionalism.
The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

863 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now