FileInUse or FilesInUse
Updated: 12 Aug 2010 | 7 comments
Hi;
I have a doubt regarding the processing of FileInUse dialog. As far as I know this dialog comes from InstallValidate action and it comes if certain files which are required to be updated or deleted are held by certain processes.
Now regarding the dialog that is being thrown to user does it come from MSI? or from WindowsInstaller? If I delete FileInUse dialog from MSI, will the WindowInstaller3.1 show its own FileInUse box?
The question is specific to Windows Installer 3.1 only as it doesnt have Restart Manager in it.
discussion Filed Under:
Comments
Good question
As you have noted, it is the InstallValidate action that determines whether a FileInUse dialog is presented to the user. This information is documented in the windows installer SDK help file, meaning that it is part of the windows installer service and the "standard" actions that you find in any MSI.
It is perfectly possible that the Wise template includes additional functionality in this area, but I don't have any information that would confirm (or otherwise) whether removing the FileInUse dialog from the MSI would avoid windows installer showing one anyway. Unless another forum member can advise you from personal experience, the quickest way to check this would be to actually give it a try and see what happens.
If your issue has been solved, please use the "Mark as Solution" link on the most relevant thread.
I deleted FileInUse dialog
I deleted FileInUse dialog from MSI and installed application it didnt throw any error. But when I use deployment channel for installation with the help of IE or OUTLOOK I get error.
This makes me think that dialog might be coming from WindowsInstaller, but it has ProductName as caption. It could be taking caption from ProductName property.
I have no clue how to "force"
I have no clue how to "force" suppressing of the FilesInUse dialog however; if you for example use the "/qb-" switch where "-" will suppress any modal dialog the FilesInUse dialog shouldn't get displayed.
Yeah
Yes I can use /qb- switch it will suppress all dialogs, infact we should use qb-! or qb!- switch for complete silent installation. /qb- will show cancel button
But the question remains, is this windows installer dialog ? or its specific to MSI. As EDT says doing it practically will tell the answer but I deleted FileInUse dialog from MSI and installed application it didnt throw any error. Now when I use deployment channel with the help of IE or OUTLOOK still I got error.
It makes me think that this dialog might be coming from Windows Installer itself. One more thing I noticed that when this error came the caption was ProductName. I guess WindowsInstaller might be picking up ProductName from MSI.
Any words?
The FileInUse dialog is
The FileInUse dialog is actually a Windows Installer dialog that is triggered if a file is in use. The option to kill the file in use before the file is to be replaced is always an option to prevent this dialog from appearing at all. There is an article in our KB 17128, that explains how to this dialog works, and what you can do to modify this dialog. I hope this information is helpful.
KB 1728
Listed below is the help from the SDK below that gives some good information (in the paragraph that starts "The InstallValidate action queries") about making changes to that dialog.
The dialogs used in the product are Windows Installer dialogs.
You may also want to consider killing the application with the Application Kill WiseScript located in the Samples directory at WPS\Wise Package Studio\WiseScript Editor\Samples.
From the SDK:
FilesInUse Dialog
A FilesInUse dialog alerts the user of processes currently running files that must be overwritten or deleted by the installation. This gives the user the opportunity to shut down these processes and avoid having to reboot the computer to complete the replacement or deletion of these files. See System Reboots.
This dialog will be created as required by the InstallValidate action.
An entry is added to an internal FilesInUse table if any file is overwritten or removed while it is open for execution or modification by any process during file costing. The FilesInUse table contains columns for the name and full path of the file. When the InstallValidate action executes, the installer queries the FilesInUse table for entries and determines the name of the process using the file. The InstallValidate action adds one record to the ListBox user interface table for each unique process identified by this query. The record contains the following values in each column:
Property: FileInUseProcess
Value: <Name of process>
Text: <Text contained in the caption of the main window of the process>
The InstallValidate action then displays the FilesInUse dialog. This dialog displays the processes that must be shut down to avoid the requirement of restarting the system to replace files in use.
The InstallValidate action queries the Dialog table for an authored dialog box with the reserved name FilesInUse dialog and displays it. This dialog must contain a ListBox control that is tied to a property named FileInUseProcess. By convention, this dialog has an Exit, Retry, or Ignore button, but this is up to the UI author. Each button should be tied to an EndDialog ControlEvent in the ControlEvent table. The InstallValidate action responds as follows to the value returned by the DoAction ControlEvent, as dictated by one of these EndDialog arguments associated with the button pushed by the user:
Retry: All values added to the ListBox table are cleared, and the entire file costing procedure is repeated, rechecking for files that are still in use. If one or more processes are still identified as using files to be overwritten or deleted, the process repeats; otherwise, InstallValidate returns control to the installer with a status of msiDoActionStatusSuccess.
Exit: The InstallValidate action immediately returns control to the installer with a status of msiDoActionStatusUserExit. This terminates the installation.
Any other return value: The InstallValidate action immediately returns control to the installer with a status of msiDoActionStatusSuccess. In this case, since one or more files are still in use, the subsequent InstallFiles and/or InstallAdminPackage actions must schedule the in-use file(s) to be replaced or deleted when the system is restarted.
If there is no ListBox table in the database, InstallValidate exits silently without an error.
The semicolon is the list delimiter for transforms, sources, and patches, and should not be used in these file names or paths.
Files marked read-only in a read-only location are never considered in use by the installed.
What will happen if there is no FileInUse Dialog in MSI
Thanks for information
But what will happen if there is no FileInUse Dialog in MSI?
How the process goes in that case?
As Ed said...
...[quote]the quickest way to check this would be to actually give it a try and see what happens.[/quote]
Don't know why 'x' happened? Want to know why 'y' happened? Use ProcMon and it will tell you.
Think about using http://www.google.com before posting.
Would you like to reply?
Login or Register to post your comment.