Where exactly can I add custom action for scheduling task for my windows service to run every night at 3am for restart using wix. Below is my code in ComponentsGenerated.wxs
<CustomAction Id=”CreateScheduledTask” Directory=”TARGETDIR” ExeCommand=”[SystemFolder]schtasks.exe /Create /SC DAILY /TN RestartService /TR “net stop BundleMultiSoil && net start BundleMultiSoil” /ST 03:00 /RU SYSTEM” Execute=”immediate” Impersonate=”no” >
Product: Multisoil App (64bit) — Error 1722. There is a problem with the
is Windows Installer package. A program run as part of the setup did not finish as expected. Contact your support personnel or package vendor. Action CreateScheduledTask, location: C:, command: C:WINDOWSSysWOW64schtasks.exe /Create /SC DAILY /TN RestartService /TR “net stop BundleMultiSoil && net start BundleMultiSoil” /ST 03:00 /RU SYSTEM
Service installed fine before. just not able to custom action it. Dont understand what I am doing wrong.
Vanshu Narang is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.