<Binary Id="KillMeSoftlyDll" SourceFile="<path to KillMeSoftly.dll>" />
Add a custom action:<CustomAction Id="TerminateNotepad.SetProperty" Return="check" Property="CustomActionData" Value="Notepad.exe" /> <CustomAction Id="TerminateNotepad" BinaryKey="KillMeSoftlyDll" DllEntry="KillMeSoftly" />
Add custom actions to i.e. InstallExecuteSequence: <InstallExecuteSequence><Custom Action="TerminateNotepad.SetProperty" After="CostFinalize">1</Custom> <!-- Adjust your condition properly --> <Custom Action="TerminateNotepad" After="TerminateNotepad.SetProperty">1</Custom> <!-- Adjust your condition properly -->
</InstallExecuteSequence>KillMeSoftly.dll will read the name of the process to "softly" terminate from CustomActionData property, therefore you must set its value prior calling it. This way you can terminate more processes without modifying the KillMeSoftly.dll.
Of course, use the attached code on your own risk. P.S. Rename attached file to KillMeSoftly.zip.
Anidil wrote:Thanks for the reply Boris. As per my understanding, there is a feature <CloseApplication/> with Wixv3.0 which sends the WM_CLOSE message to the systray.exe.But right now i'musing WiX v2.0; any idea how to implement the same here? Boris Krivonog wrote:You should terminate your system tray application "softly", meaning that you send WM_CLOSE message to systray.exe. This way, the systray.exe application is notified that it is about to shut down and has time to remove icon from tray. See link for details: http://support.microsoft.com/kb/178893. Off course, systray.exe must have a valid window which will shut down you app when this message is received.Hope this helps. Anidil wrote:Oki..I could get the systray process killed but the tray icon waits for a mouse over to disapear, because of that the installer throws an icon file-------------------------------------------------------------------------in use dialog.Is there a way to avoid this ? Alexander Shevchuk wrote:"Files In Use" dialog is shown by InstallValidate action. Schedule yourcustom action before InstallValidate. -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Anidil Sent: Friday, February 22, 2008 3:16 AM To: wix-users@lists.sourceforge.net Subject: [WiX-users] Custom action sequencing problem I use the following custom action to kill systray process befre the uninstall. <Binary Id= ...... /> <CustomAction Id="StopUserExe" BinaryKey="taskkill" ExeCommand ="/im systray.exe /t /f" Impersonate="yes" Return="asyncNoWait" /> <InstallExecuteSequence> <Custom Action="StopUserExe" Before="RemoveFiles">Installed</Custom> </InstallExecuteSequence>This works fine but i get the Files in Use dialog before the CA actually runs.How do i be sequencing the CA to run at the start of uninstall? Oris there any way to sequence 'Files in Use' dialog? Please help -- View this message in context:http://www.nabble.com/Custom-action-sequencing-problem-tp15632069p15632069.htmlSent from the wix-users mailing list archive at Nabble.com.-------------------------------------------------------------------------This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users-------------------------------------------------------------------------This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-usersThis SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users
KillMeSoftly.zipx
Description: Binary data
------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users