Thx Matt, that did the trick, but i hit another snag on the same issue. When
i install to a user specific destination, the QtExecute action works, but
when i do an install for all users i get an Access Denied message when the
QtExecute is performed. I presume the reason for this is that uninstall.exe
is then located under c:\Program Files\Appname and the UAC does not allow a
Standard User to delete from there? Iv'e looked around a bit and it is
suggested to do a deferred execute with Impersonate set to no. Iv'e tried
that :

<Property Id="QtExecDeferred" Value='"[SystemFolder]\Cmd.exe"  /C del /Q
"[APPLICATIONFOLDER]\uninstall.exe"'/>
    <CustomAction Id="QtExecDeferred" BinaryKey="WixCA"
DllEntry="CAQuietExec" Execute="deferred" Return="ignore" Impersonate="no"/>

But i get the following error:

Action 16:03:22: QtExecDeferred.
MSI (s) (D4:40) [16:03:22:362]: Executing op:
CustomActionSchedule(Action=QtExecDeferred,ActionType=3137,Source=BinaryData,Target=CAQuietExec,CustomActionData="[SystemFolder]\Cmd.exe"
 /C del /Q "[APPLICATIONFOLDER]\uninstall.exe")
MSI (s) (D4:E8) [16:03:22:378]: Invoking remote custom action. DLL:
C:\Windows\Installer\MSI7586.tmp, Entrypoint: CAQuietExec
MSI (s) (D4:BC) [16:03:22:378]: Generating random cookie.
MSI (s) (D4:BC) [16:03:22:378]: Created Custom Action Server with PID 2720
(0xAA0).
MSI (s) (D4:C4) [16:03:22:409]: Running as a service.
MSI (s) (D4:C4) [16:03:22:409]: Hello, I'm your 32bit Elevated custom action
server.
CAQuietExec:  Error 0x80070002: Command failed to execute.
CAQuietExec:  Error 0x80070002: CAQuietExec Failed

Iv'e searched around a bit and it seems that HResult 0x80070002 means that
the file could not be found. I'm guessing that maybe [APPLICATIONFOLDER] can
not be resolved when doing a deferred execution?

Any advice would again be much appreciated!

Regards,
Imri Lubbe

On Fri, May 7, 2010 at 8:34 PM, Matt Johnson <[email protected]> wrote:

> 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
>
------------------------------------------------------------------------------

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

Reply via email to