I'm not clear on what this means - maybe it's a typo? InstallInitialize isn't 
when files are removed: 

"..... it needs to be stopped before the 'InstallInitialize' begins (i.e. 
before the files and the executables are removed)." 

It might help say something about what the reasons are. If there's some kind of 
files-in-use issue then you could integrate that app with the Restart Manager 
and Windows would look after shutting it down and starting it up, plus it could 
save state for it to restart where it left off. 

Otherwise, the problem is that the audited part of the install is between 
InstallInitialize and InstallFinalize and if you don't get that far because of 
a canceled UAC prompt then there is nothing to roll back. 

Phil Wilson 

-----Original Message-----
From: maria de souza [mailto:maria.g.deso...@gmail.com] 
Sent: Thursday, May 27, 2010 12:01 PM
To: wix-users@lists.sourceforge.net
Subject: [WiX-users] How to write a custom action to launch an exe when UAC is 
cancelled or timed-out during uninstall ?

We are building an installer for our product using the WIX technology. We
set InstallPrivileges to 'elevated' as we need to write to the HKLM hive
etc.

The application has an exe that is launched after installation and runs on
the system. For several reasons, it needs to be stopped before the
'InstallInitialize' begins (i.e. before the files and the executables are
removed).

On Vista and Windows 7, we need to recover and launch the exe again if the
user cancels the UAC prompt or it times-out and the application is not
uninstalled.

In the wxs file, we define a rollback action:

<CustomAction Id="RestartApp" Execute="rollback" FileKey="myapp.exe"
ExeCommand="" Return="ignore" />
<InstallExecuteSequence>
...
<Custom Action='RestartApp' After='InstallInitialize' >(REMOVE~="ALL" OR
MaintenanceMode="Remove")

AND Installed</Custom>
</InstallExecuteSequence>

However, this never gets called!

How can I detect the UAC is cancelled and recover and launch the exe?
------------------------------------------------------------------------------

_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


*** Confidentiality Notice: This e-mail, including any associated or attached 
files, is intended solely for the individual or entity to which it is 
addressed. This e-mail is confidential and may well also be legally privileged. 
If you have received it in error, you are on notice of its status. Please 
notify the sender immediately by reply e-mail and then delete this message from 
your system. Please do not copy it or use it for any purposes, or disclose its 
contents to any other person. This email comes from a division of the Invensys 
Group, owned by Invensys plc, which is a company registered in England and 
Wales with its registered office at Portland House, Bressenden Place, London, 
SW1E 5BF (Registered number 166023). For a list of European legal entities 
within the Invensys Group, please go to 
http://www.invensys.com/legal/default.asp?top_nav_id=77&nav_id=80&prev_id=77. 
You may contact Invensys plc on +44 (0)20 7821 3848 or e-mail 
inet.hqhelpd...@invensys.com. This e-mail and any attachments thereto may be 
subject to the terms of any agreements between Invensys (and/or its 
subsidiaries and affiliates) and the recipient (and/or its subsidiaries and 
affiliates).



------------------------------------------------------------------------------

_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to