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

Locked File


2 replies to this topic

babette83

babette83
  • Members
  • 13 posts

Posted 18 July 2005 - 16:31

Hello,

I want to update a .dll file which is locked by the system.
How can I do?
Which are the conerned registry key?

I don't want the dialog box specifying the locked file to be displayed and then cancel the installation.
I'd like that the locked file is updating after a required reboot at the end of the installation.

To create my msi package, I use only "Orca.msi".
I install on Windows 2000/XP

Thanks in advance




dtasanas

dtasanas
  • Full Members
  • 83 posts

Posted 17 August 2005 - 17:36

are you looking to "unlock" a locked file? i don't think you can do that. the only way that i know to replace a locked file is by replacing it on reboot.

i came across a similar situation with the "files in use" dialog. i tried to bypass this dialog but found it difficult and not recommened.

so i have had to settle for showing the "files in use" dialog and requesting reboot.
Don Tasanasanta[br]Configuration/Installation Eng

Zweitze

Zweitze
  • Full Members
  • 522 posts

Posted 18 August 2005 - 21:25

Actually it's more sophisticated. During InstallValidate the Installer checks all files that it would replace. If a file is found in use, it tries to track down which process is using it. Using that process, it tries to detect whether it has a window open. If that is the case, the program name is listed in the "Files in use" dialog. If the process has no window, the Installer has no program. For those files, the user won't get a "Files in use" dialog, and a reboot will always be assumed.

So your workaround is doing exactly the same (figure out which process etc.) and then either hide that window or closing the process, in the latter case a reboot wouldn't be necessary.

This is not straightforward: the determination of the files that the Installer wants to replace, or determination of the process that has a file open is very hard. Maybe you know a couple of files that are always in use by a certain process. In that case, the task could be easier. (For example: If you have an Outlook COM Add-in, you could unload this Add-in).