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.
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...
svapnilpatel
1 Post
BAT file to Windows Service
Jan 11, 2013 12:23 AM|LINK
Hello Everyone,
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.
Thanks,
Sap.
fab777
925 Posts
Re: BAT file to Windows Service
Jan 11, 2013 08:36 AM|LINK
Hi,
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: http://technet.microsoft.com/en-us/library/cc754494%28v=ws.10%29.aspx
Please 'Mark as Answer' if this post helps you.
Fabrice ZERROUKI