[wix-users] Error when removing msi

Imran baloch imran_ku07 at yahoo.com
Wed Mar 31 22:20:33 PDT 2021

Hi Jacob,
Thanks for your reply. Sorry I am very new to wix.
 Actually my requirement was,
1) Add an entry in windows/drivers/etc/hosts file.2) Put files in a folder.3) Remove an windows service if exist and re install it.
I found on web I can use cmd. What else I can use?

Regards,Imran Baloch Microsoft MVP (2011-2016), DZone MVB, MCP, MCTS, MCPD, MCS(Gold Medalist) 

    On Wednesday, March 31, 2021, 09:16:06 PM GMT+4, Hoover, Jacob <jacob.hoover at greenheck.com> wrote:  
 #yiv6068357216 #yiv6068357216 -- _filtered {} _filtered {}#yiv6068357216 #yiv6068357216 p.yiv6068357216MsoNormal, #yiv6068357216 li.yiv6068357216MsoNormal, #yiv6068357216 div.yiv6068357216MsoNormal {margin:0in;font-size:11.0pt;font-family:sans-serif;}#yiv6068357216 a:link, #yiv6068357216 span.yiv6068357216MsoHyperlink {color:blue;text-decoration:underline;}#yiv6068357216 .yiv6068357216MsoChpDefault {font-size:10.0pt;} _filtered {}#yiv6068357216 div.yiv6068357216WordSection1 {}#yiv6068357216 
Exe based CA’s are ugly at best.  Is there a reason you can’t author the changes as standard MSI actions?
From: wix-users <wix-users-bounces at lists.wixtoolset.org>On Behalf Of Imran baloch via wix-users
Sent: Wednesday, March 31, 2021 4:43 AM
To: WiX Toolset Users Mailing List <wix-users at lists.wixtoolset.org>
Cc: Imran baloch <imran_ku07 at yahoo.com>
Subject: [wix-users] Error when removing msi
I have the following,
  <InstallExecuteSequence>      <Custom Action="ExecInstallService" Before="InstallFinalize" />      <Custom Action="ExecAddHostEntry" After="ExecInstallService" >NOT Installed AND NOT REMOVE</Custom>      <Custom Action="ExecRemoveService" After="ExecInstallService" >(NOT UPGRADINGPRODUCTCODE) AND (REMOVE="ALL")</Custom>      <Custom Action="ExecDeleteFiles" After="ExecRemoveService" >(NOT UPGRADINGPRODUCTCODE) AND (REMOVE="ALL")</Custom>    </InstallExecuteSequence>

<CustomAction Id='ExecRemoveService' Directory="INSTALLDIR" Execute="deferred" ExeCommand='cmd.exe /k "My.exe -remove & exit"' Return="check" Impersonate="no"></CustomAction>

But when there is no folder and I am getting error when removing. Is there is way to ignore if no folder exist,

Product: My Service -- Error 1721. There is a problem with this Windows Installer package. A program required for this install to complete could not be run. Contact your support personnel or package vendor. Action: ExecInstallService, location: C:\Location\, command: cmd.exe /k "My.exe -remove & My.exe -install & exit"

WiX Toolset Users Mailing List provided by FireGiant http://www.firegiant.com/ 
NOTE: This email was received from an external source. Please use caution when opening links or attachments in the message.

More information about the wix-users mailing list