I am in the process of writing an MSI installer for a web application. Unfortunately the Windows Installer does not check for locked files, if they are not used by an application with a visible window. The problem is that one of the files I need to replace is an ISAPI DLL, which is only used by IIS, so it does not get detected as 'locked' during setup. This causes the setup program to require a reboot after it completes.
What I would like to do is write code -- either in C++, or in VBScript -- that will detect if that particular DLL is in use. My setup program will use this information to notify the use and ask them to stop IIS before proceeding.
Does anybody have code that would do this? Please note that this is not a COM DLL.