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.

user960567
  • 28,664
  • 58
  • 165
  • 292

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" />
user960567
  • 28,664
  • 58
  • 165
  • 292