I managed to solve this using a type 2 ca which runs an executable to
perform the shutdown, or alternatively a type 6 vbs script which runs before
InstallValidate.
It turns out the reason I was getting errors initially is because a managed
ca cannot run as anything other than deferred (correct me if I'm worng). It
also seems it is possible to kill the process using as the user without
elevation.
It's a bit short sighted that there's no built in functionality in msi to
provide a default action to the the Restart Manager.
MSIRESTARTMANAGERCONTROL has no affect on vista, but the same functionality
can be gained by removing the msiRMFileInUse dialog.
I'd be interested in taking a look at the wix CloseApp but not sure how I
would access it? Also I need to shut the application gracefully (I'm not
actually using kill process). Does CloseApps send a close messgae or does it
kill it?
From: Bob Arnson <[EMAIL PROTECTED]>
To: Michael Carlisle <[EMAIL PROTECTED]>
CC: wix-users@lists.sourceforge.net
Subject: Re: [WiX-users] Uninstall Files in use
Date: Wed, 15 Nov 2006 09:24:22 -0800
Michael Carlisle wrote:
If I run the CA as immediate I get an error on uninstall, also when I
tried moving the CA in the sequence it errors. I also notice that the
files in use check happens before elevation so my CA woudn't have
permissions anyway.
The Files in Use model is to report, not force the apps to close during the
immediate sequence. The CloseApps custom action uses that but does the
closing as an elevated CA.
I could remove the RM Files in use dialog altogether which will then not
use RM and fall back to the FileInUse dialog which happens later, but
still need to get the CA to run eariler. Where in the sequence would I
move the CA to? Before InstallValidate right?
InstallValidate is where MSI does files-in-use detection. You can suppress
RM support with the MSIRESTARTMANAGERCONTROL property
<http://msdn.microsoft.com/library/default.asp?url=/library/en-us/msi/setup/msirestartmanagercontrol.asp>.
Oter solution is to change the dialog so that it returns immediately, is
there a way to do this? I tried adding a publish event to a bitmap control
but it doesn't seem to fire.
MSI UI doesn't support that, AFAIK.
--
sig://boB
http://bobs.org
_________________________________________________________________
Windows LiveĀ Messenger has arrived. Click here to download it for free!
http://imagine-msn.com/messenger/launch80/?locale=en-gb
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users