Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

.bat files in Firefox

Posted on 2012-03-16
9
Medium Priority
?
310 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 does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
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 84

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 84

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 84

Accepted Solution

by:
Dave Baldwin earned 2000 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

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

When we want to run, execute or repeat a statement multiple times, a loop is necessary. This article covers the two types of loops in Python: the while loop and the for loop.
Today, still in the boom of Apple, PC's and products, nearly 50% of the computer users use Windows as graphical operating systems. If you are among those users who love windows, but are grappling to keep the system's hard drive optimized, then you s…
The viewer will learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…

715 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