Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

.bat files in Firefox

Posted on 2012-03-16
9
Medium Priority
?
311 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
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
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

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

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

Citrix XenApp, Internet Explorer 11 set to Enterprise Mode and using central hosted sites.xml file.
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.
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)
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
Suggested Courses
Course of the Month9 days, 11 hours left to enroll

877 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