MSFN Forum: How can I run .bat file from IIS6 - MSFN Forum

Jump to content



Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

How can I run .bat file from IIS6 Rate Topic: -----

#1 User is offline   bbbngowc 

  • Member
  • PipPip
  • Group: Members
  • Posts: 127
  • Joined: 09-August 06

Posted 20 December 2006 - 12:46 PM

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.


#2 User is offline   tain 

  • Cyber Ops
  • Group: Super Moderator
  • Posts: 3,412
  • Joined: 24-September 05
  • OS:none specified
  • Country: Country Flag

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?

#3 User is offline   CoffeeFiend 

  • Coffee Aficionado
  • Group: Super Moderator
  • Posts: 5,031
  • Joined: 14-July 04
  • OS:Windows 7 x64
  • Country: Country Flag

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 User is offline   bbbngowc 

  • Member
  • PipPip
  • Group: Members
  • Posts: 127
  • Joined: 09-August 06

Posted 21 December 2006 - 08:50 AM

Hey thanks a lot crahak!

I did what you said and it worked. Much appreciated!!! :thumbup

#5 User is offline   tain 

  • Cyber Ops
  • Group: Super Moderator
  • Posts: 3,412
  • Joined: 24-September 05
  • OS:none specified
  • Country: Country Flag

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 User is offline   CoffeeFiend 

  • Coffee Aficionado
  • Group: Super Moderator
  • Posts: 5,031
  • Joined: 14-July 04
  • OS:Windows 7 x64
  • Country: Country Flag

Posted 21 December 2006 - 08:07 PM

View PostTAiN, 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!)

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users



All trademarks mentioned on this page are the property of their respective owners
Copyright © 2001 - 2011 msfn.org
Privacy Policy