MSI engine surely detects every file in use which needs replacing. It only 
shows the associated application, not the affected files, though.

Maybe MSI should provide some properties or information for such files in use. 
But as I can find none, we may have to deal with creating a custom action to 
achieve what you want.
 
* Create an immediate custom action to detect files in use which needs 
replacing.

1. For each row in File table, get the file key and test [#filekey] is not null 
after CostFinalize action. Those files (#filekey is target path) are being 
installed in your local system.

2. With those files, use CreateFile with no file sharing mode and check for 
errors, if the file handle cannot be obtained, it is in use by other 
applications. List of such files can be shown use MsiProcessMessage.
Add "Ignore" also in your dialog, as there can be some cases where it is not 
feasible to close the application.

As this is an immediate custom action, there are still some possibilities that 
files are locked during the lapse between the detection and copy script 
execution. But as MSI schedule a reboot in that case, it is okay. (Not 100% 
prevention is possible).

Maybe there is a better way than this, which I do not know yet.

Regards,

Chesong Lee

-----Original Message-----
From: Alexander Biryukov [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, August 22, 2006 12:36 PM
To: Chesong Lee; Nat Luengnaruemitchai; wix-users@lists.sourceforge.net
Subject: Re: [WiX-users] Citrix and FilesInUse


Is it real to create the custom action, that checks rewrite access to file  
before each copy operation during product installation ?
I need to show dialog with locked file name. Information about running  
application is not obligatory.

For example simple dialog:
----------------------------------------------
  File "c:\MyProgram\lib.dll" is locked !
----------------------------------------------
            [Retry] [Abort]
----------------------------------------------

---
Alexander Biryukov


On Tue, 22 Aug 2006 18:10:32 +0400, Chesong Lee <[EMAIL PROTECTED]>  
wrote:

>
> FilesInUse mechanism in MSI only *shows* files in use associated with  
> top-level Windows in the current session. If you want to prevent reboot,  
> I hate to say this but you need a custom action. Most of the  
> non-standard processing requires a custom action. WiX toolset has  
> several custom actions but your scenario can be too application-specific  
> to fit into the general WiX custom actions.
>
>
> A scenario is to detect the application running in other sessions  
> (possibly with help of your application) from your custom action and ask  
> the user to close the application before continuing setup. Dialog can be  
> invoked from the custom action with MsiProcessMessage (FilesInUseDialog  
> can be specified with INSTALLMESSAGE_FILESINUSE).
>
>
> Regards,
>
>
> Chesong Lee
>
>
> ________________________________
>
> From: [EMAIL PROTECTED]  
> [mailto:[EMAIL PROTECTED] On Behalf Of Nat  
> Luengnaruemitchai
> Sent: Tuesday, August 22, 2006 7:39 AM
> To: wix-users@lists.sourceforge.net
> Subject: [WiX-users] Citrix and FilesInUse
>
>
> Hi,
>
>
> I'm using WiX 2.0 to create an MSI installer for a Citrix application. I  
> found out that FilesInUse cannot detect files in use by other users in  
> the same Citrix server i.e. it doesn't provide any warning before do the  
> installation. Therefore, at the end, it will tell me that I need to  
> reboot the Citrix server. Is there a way to force FilesInUse to detect  
> more thoroughly?
>
>
> P.S. I have admin right on the machine.
>
>
> Thanks,
>
> Nat
>


-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to