Solved

.bat files in Firefox

Posted on 2012-03-16
9
303 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
  • 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
DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

 
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

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

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

Suggested Solutions

Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
If you are a web developer, you would be aware of the <iframe> tag in HTML. The <iframe> stands for inline frame and is used to embed another document within the current HTML document. The embedded document could be even another website.
The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

772 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