I have an internal website and there's a link on the site I'm trying to run. The link calls a Batch file. But when I click on the link I'm getting a page can not be displayed. I'm sure the file is in the right place and the url and name is correct.
Does anyone know how I can call this file from the link?
Windows 2003 Server with IIS 6.
Thanks.
Page 1 of 1
How can I run .bat file from IIS6
#2
Posted 20 December 2006 - 10:27 PM
Are you getting an error from the server or your browser? It can be tough to tell sometimes. Please tell us exactly what that error is and describe how it is presented to you.
Have you tested the file to ensure that it works without the server as a variable?
Have you tested the file to ensure that it works without the server as a variable?
#3
Posted 21 December 2006 - 12:50 AM
You can't download batch files by default off IIS6, you have to give it a MIME type first (it won't just guess). Go in IIS admin, whatever site's properties, HTTP headers, MIME types, new, extension: "bat", MIME type either "application/batch" if you want people to download it (or users to run it locally straight from IE) or "text/plain" if you want people to see the batch's content displayed (as text) and copy/paste.
#4
Posted 21 December 2006 - 08:50 AM
Hey thanks a lot crahak!
I did what you said and it worked. Much appreciated!!!
I did what you said and it worked. Much appreciated!!!
#5
Posted 21 December 2006 - 08:53 AM
Incorrect MIME type was my first idea but I thought IIS handled that stuff pretty well by default. Any time I've had MIME issues it has been on Apache. It worked by default in IIS5, right?
#6
Posted 21 December 2006 - 08:07 PM
TAiN, on Dec 21 2006, 10:53 AM, said:
Incorrect MIME type was my first idea but I thought IIS handled that stuff pretty well by default. Any time I've had MIME issues it has been on Apache. It worked by default in IIS5, right?
Yes, the defaults are pretty good, although some stuff is disabled by default for security reasons (understandably). As for IIS5, it did work IIRC, but I don't have a Win2k box around to test, so I can't tell for sure (we hardly ever deploy anything on IIS5 anymore, and we're definitely looking forward to v7!)
- ← netgear Ethernet Switch (FS605) software
- Networks and the Internet
- Norton Internet Security 2005 →
Share this topic:
Page 1 of 1



Help

Back to top









