IIS 7 & IIS 8
Known Issues and Workarounds
BAT file to Windows Service
Last post Jan 11, 2013 08:36 AM by fab777
Jan 11, 2013 12:23 AM|LINK
I have got this BAT file which is scheduled to shut down and then restart the WWW publishing service in one of the production server every night.
Since last few weeks the IIS is not restarting automatically and Service desk has to do it manually, so my manager came up with the idea to convert this BAT file into a Windows service so that it can give more command on how this whole process works and
in case anything goes wrong it will be more easier to troubleshoot in future.
Now first thing, I have never done such thing so I have no idea whether it is possible or not to convert BAT file to windows service.
P.S. The BAT file calls a .vbs file which conatins all the commands.
Jan 11, 2013 08:36 AM|LINK
some tools exists to make a windows service from (nearly) any source... But, that's not really what you should do. First, pal, we're in 2013. I mean schedule a batch file which calls a vbs script which restart IIS. Waou, what an old and heavy process...
If you're using IIS 7+ (since you've posted in the IIS 7 & 8 forum) you can schedule the application pools recycling in their configuration: