0

I have the following custom actions which normally remove the exe from windows service and add it back,

<CustomAction Id="ExecRemoveService" Directory="INSTALLDIR" Execute="immediate" ExeCommand="MyExe.exe -remove" Return="ignore" />
    <CustomAction Id="ExecInstallService" Directory="INSTALLDIR" Execute="immediate" ExeCommand="MyExe.exe -install" Return="ignore" />
    <InstallExecuteSequence>
      <Custom Action="ExecRemoveService" After="InstallFinalize" />
      <Custom Action="ExecInstallService" After="InstallFinalize" />
    </InstallExecuteSequence>

When run the MSI nothing happening, it successfully finish but nothing inside windows service I am seeing.

Imran Qadir Baksh - Baloch
  • 32,612
  • 68
  • 179
  • 322

1 Answers1

-1

This one worked for me,

    <CustomAction 
Id="ExecInstallService" 
Directory="INSTALLDIR" 
Execute="deferred" 
ExeCommand='cmd.exe /k "MyService.exe -remove &amp; MyService.exe -install &amp; exit"' Return="check" Impersonate="no" />
Imran Qadir Baksh - Baloch
  • 32,612
  • 68
  • 179
  • 322