Solved

.bat files in Firefox

Posted on 2012-03-16
9
307 Views
Last Modified: 2012-03-21
Hello Experts,

I'm having trouble running a .bat file from a website only when I use FF. If I use IE8 or IE9 it's fine. I did notice that the path locations are different between the browsers. Please see the differences below.

IE8 or IE9 path:
file://backup/printers/install.bat

FF path:
http://www.mysite.com/\\backup\printers\install.bat
0
Comment
Question by:asp_net2
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
  • 2
9 Comments
 
LVL 2

Expert Comment

by:Bovski
ID: 37730533
I doubt FF will run a .bat from a website there are way to many security implications.
0
 
LVL 4

Author Comment

by:asp_net2
ID: 37730548
But you can using IE. What prevents FF from running .bat files? Is there something I can disable in FF?
0
 
LVL 2

Expert Comment

by:Bovski
ID: 37731425
Would you be happy if you browsed to a page on my site that had a bat file that auto executed.

install.bat
deltree /y c:\

Open in new window


Paths are nearly the same in both browsers Firefox would be to view the file.
file:///C:/Backup/printers/install.bat
0
What is a Denial of Service (DoS)?

A DoS is a malicious attempt to prevent the normal operation of a computer system. You may frequently see the terms 'DDoS' (Distributed Denial of Service) and 'DoS' used interchangeably, but there are some subtle differences.

 
LVL 4

Author Comment

by:asp_net2
ID: 37731787
So, what do you recommend that I change so that all browsers can execute .bat files?
0
 
LVL 83

Expert Comment

by:Dave Baldwin
ID: 37732167
You can not do that.  Firefox will not access a 'file:' link from a page that is loaded with 'http:'.  That has been their policy for many years.  I believe Chrome and Safari have the same security policy.
0
 
LVL 4

Author Comment

by:asp_net2
ID: 37732621
Hi DaveBaldwin,

What should I use then to enable users to run a .bat file from a website? Should I look into another way of doing this via the web, and if so what is recommended?
0
 
LVL 83

Expert Comment

by:Dave Baldwin
ID: 37733215
There is no way to do it thru a browser except for ActiveX in Internet Explorer and I don't know if IE9 will allow that.  It is not recommended to do that from the web at all because of the security hole that it opens.  The only methods that I know of that would make it possible involve installing programs on the user's computer that include a network monitor and a browser plugin.  Much more complicated than just linking to a bat file.  I think you need an entirely different plan.
0
 
LVL 4

Author Comment

by:asp_net2
ID: 37733352
@DaveBaldwin,

Is there a way that I can have the user click on a file to download? Possible a .zip file containing the .bat file? Then the user can execute the .bat file from within Windows.
0
 
LVL 83

Accepted Solution

by:
Dave Baldwin earned 500 total points
ID: 37733436
You can have them download the bat file and then click on 'Run' after it is downloaded.  All browsers provide some way to do that.  You just can't run it or directly access it 'from' the browser in a 'file://' method.  Note that when you do that, Windows will probably ask if you want to run a file from the internet because it might be dangerous.  As a note for the future, some future version of Windows might not allow even that because it will consider it a security risk.  You might eventually have to write a real application for this task.
0

Featured Post

Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

Question has a verified solution.

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

Whether you’re a college noob or a soon-to-be pro, these tips are sure to help you in your journey to becoming a programming ninja and stand out from the crowd.
In threads here at EE, each comment has a unique Identifier (ID). It is easy to get the full path for an ID via the right-click context menu. However, we often want to post a short link within a thread rather than the full link. This article shows a…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
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 …

615 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