From the
www.west-wind.com (hopefully Rick Strahl won't mind me pasting this here...)
Releasing the IIS Process
To shut down IIS completely you can use a batch file like the following:
KILL INETINFO
pause
NET START IISADMIN
NET START W3SVC
Kill is a utility from the NT resource kit that will kill any process dead in its tracks. It's the quickest way to shut down IIS completely. Note that after killing the process you need to wait about 5-10 seconds or so before you can restart it. This is because the NT Service Manager polls running services and if it hasn't updated the status of the service as Not Running it will not restart it. The Pause in the batch file takes care of this, but you do have to press a key to make it happen (or you can use a third party DOS timed wait program).
I don't recommend you do this with a production server, but it works great for a development box. BTW, if IIS is hung and will not shut down via the service manager this same batch file will shut down and restart your server! It's a handy routine to have available.
This works great for me, with much thanks to Rick. Hopefully this is what you are looking for.
>Thanks David
>That is what I was looking for. It seems like it shoud be fairly straightforward to unload a dll when you are sure the usage count is 0. I just haven't found it yet.
>
>Bill
>
>>Bill,
>>
>>Search the threads here. There is a way that the DLL can be unloaded without a total reboot. I don't recall the way to do it but it has been discussed here.
>>
Eric Shaneson
Cutting Edge Consulting