Actually, you need /C to the cmd.exe also.

<Property Id="QtExecCmdLine" Value='"[SystemFolder]\Cmd.exe" /C del /Q 
"[APPLICATIONFOLDER]\uninstall.exe"'/>



Matt Johnson MCPD, MCTS, MCSD, MCDBA
Director of Application Development
Time America, Inc.
[email protected] | www.timeamerica.com

From: Matt Johnson [mailto:[email protected]] 
Sent: Friday, May 07, 2010 6:16 AM
To: Windows Installer XML toolset developer mailing list
Subject: Re: [WiX-devs] Deleting an exe file that was launched during Uninstall

Specify /Q to the del command.

Matt Johnson MCPD, MCTS, MCSD, MCDBA
Director of Application Development
Time America, Inc.
[email protected] | www.timeamerica.com

From: Imri Lubbe [mailto:[email protected]] 
Sent: Friday, May 07, 2010 5:35 AM
To: [email protected]
Subject: [WiX-devs] Deleting an exe file that was launched during Uninstall

Hi all,

Iv'e got the following problem:

On the uninstall of my application I call an external wrapper (uninstall.exe, 
basically an nsis script that asks the user if they want to uninstall custom 
user data created during the product's life span or not). This works and if the 
user choses to delete the custom user data, the uninstall.exe wrapper runs 
first deleting the custom user data and the WiX cleans up the rest. The only 
problem is that the uninstall.exe wrapper gets left in the application 
directory and i don't know how to get rid of it... Iv'e tried using 
QtExecCmdLine to remove it via the command line, like so:
<Property Id="QtExecCmdLine" Value='"[SystemFolder]\Cmd.exe" del 
"[APPLICATIONFOLDER]\uninstall.exe"'/>
 <CustomAction Id="QtExecute" BinaryKey="WixCA" DllEntry="CAQuietExec" 
Execute="immediate" Return="check"/>

<Custom Action="QtExecute" After="InstallFinalize"/>

But during the Uninstall when the Qt Custom Action runs, the command line gets 
stuck on the command and i have to manually close the command line(running in 
the background) with a program like Windows Defenders Software Explorer. No 
error is being reported by the Verbose Debugger.

MSI (s) (F8:1C) [14:12:14:753]: Doing action: QtExecute
MSI (s) (F8:1C) [14:12:14:753]: Note: 1: 2205 2:  3: ActionText 
Action 14:12:14: QtExecute. 
Action start 14:12:14: QtExecute.
MSI (s) (F8:CC) [14:12:14:753]: Invoking remote custom action. DLL: 
C:\Windows\Installer\MSI2FBF.tmp, Entrypoint: CAQuietExec
MSI (s) (F8:34) [14:12:14:753]: Generating random cookie.
MSI (s) (F8:34) [14:12:14:768]: Created Custom Action Server with PID 3156 
(0xC54).
MSI (s) (F8:40) [14:12:14:800]: Running as a service.
MSI (s) (F8:40) [14:12:14:800]: Hello, I'm your 32bit Impersonated custom 
action server.
MSI (s) (F8!5C) [14:12:14:831]: PROPERTY CHANGE: Deleting QtExecCmdLine 
property. Its current value is '"[SystemFolder]\Cmd.exe" del 
"[APPLICATIONFOLDER]\uninstall.exe"'.
CAQuietExec:  Microsoft Windows 
CAQuietExec:  Copyright (c) 2006 Microsoft Corporation.  All rights reserved.
CAQuietExec:  
Action ended 14:12:38: QtExecute. Return value 1.
Action ended 14:12:38: INSTALL. Return value 1.

Any suggestions would be greatly appreciated.

Thx,

Imri

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

_______________________________________________
WiX-devs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wix-devs

Reply via email to