Solved

.bat files in Firefox

Posted on 2012-03-16
9
301 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
 
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
How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

 
LVL 82

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 82

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 82

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

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

If you haven’t already, I encourage you to read the first article (http://www.experts-exchange.com/articles/18680/An-Introduction-to-R-Programming-and-R-Studio.html) in my series to gain a basic foundation of R and R Studio.  You will also find the …
The purpose of this article is to demonstrate how we can use conditional statements using Python.
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.
This Micro Tutorial will demonstrate how to add subdomains to your content reports. This can be very importing in having a site with multiple subdomains.

706 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

17 Experts available now in Live!

Get 1:1 Help Now