PDA

View Full Version : Locked DLL deleted on reboot and not replaced



Mondele
04-01-2009, 10:46 AM
Hello,

I'm sure I have read about this issue before but now that I've come across it myself I can't find any information on it.

My installer is installing a DLL file that may be locked by another program. I believe the following is happening:
-If I'm not mistaken, upgrading software actually means uninstalling and re-installing the software. So the first step, it tries to unistall my software.
-It finds this DLL is in use by another program and so it is locked, therefore it cannot delete the DLL.
-Since it cannot delete the file now, it sets it to delete on reboot.
-However, it then completes the rest of the installation before reboot. (a restart prompt appears only after the installation is complete)
-Upon the reboot the DLL file is deleted. It is not replaced.

If I run my software the installer repairs it and puts the DLL back. However, if the user tries to run the other software first, it cannot find the DLL. Seeing as the other software happens to be Outlook, that is a very real possibility.

Any help would be appreciated.