Jump to content


This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.
Photo

how to delete file in use on reboot


2 replies to this topic

marco.peretti

marco.peretti
  • Full Members
  • 1 posts

Posted 08 July 2008 - 16:34

Hi everybody,

our product installs a number of system dlls which are not safe to delete when uninstalling the product and hence they should b deleted on reboot. I know i can create a custom action, call CreateFile with FILE_FLAG_DELETE_ON_CLOSE but I am wondering is MSI( or InstallSheild ) offer a way to achieve the same result out of the box as it is a common problem.

BTW, we are not really talking about replacing a file in use but deleting a file in use when the product is un-installed.

thanks,

Marco

Zweitze

Zweitze
  • Full Members
  • 522 posts

Posted 09 July 2008 - 08:06

Windows Installer does that, assuming that the file is part of a component, and that component is not 'permanent'.
It does even better: when the file is used by a program with a UI, it asks the user to close that program. If the user does so, a reboot won't be necessary.
If that fails or the program does not have a UI, Windows Installer will ask for a reboot at the end.

stevenwaugh

stevenwaugh
  • Full Members
  • 2 posts

Posted 02 November 2008 - 19:00

This is nothing new - there have been tons of programs, many smaller and not requiring the install of an entire "power tools" pack, that delete files in DOS when the computer restarts and before Windows loads.
A banker is someone who lends you an umbrella when the sun is shining, and who asks for it back when it start to rain.
the buy isk blog