[wix-users] How to debug schedtask.exe command line ?

Gary M garym at oedata.com
Fri Apr 15 03:33:55 PDT 2016


I found answer

1) Do not use CAQuiteExec
2) ExeCommand using cmd.exe with the /k option to launch the command
3) at the end of the command to execute, place an & pause

This will execute the command and wait in the command prompt window.  You
an type an exit command with a return value to fail the install.

On Fri, Apr 15, 2016 at 12:22 AM, Gary M <garym at oedata.com> wrote:

> I have another nube question.. ,
>
> I'm trying to schedule a task, and it will not show in the active task
> list after installation.
>
> When I run the command line copied out of the log file, it executes
> without issue..
>
> Can someone tell me what I'm doing wrong ?  or tell me how to increase the
> debug level on the custom action to see what windows doesn't like ??
>
>
>   <!-- Custom Action config for hidden installation of tasks" -->
>   <CustomAction Id="hidden.Exec.Command"
>       Return="check"
>       Impersonate="no"
>       Execute="deferred"
>       BinaryKey="WixCA"
>       DllEntry="CAQuietExec"
>   />
>
>   <!-- Custom Action for installing "MyTask" Tasks" -->
>   <CustomAction Id="create.MY.TASK"
>       Property="hidden.Exec.Command"
>       Execute="immediate"
>       Value=""[SystemFolder]SCHTASKS.EXE" /CREATE /SC MINUTE /MO
> 30 /TN MyTask /TR "php \"[MY_INSTALL_DIR]\MyTask.php\""
> /RU $(var.Admin.Name) /RP $(var.Admin.Password)"
>   />
>
> The command line from the log is:
>
> Action start 0:03:07: "create.MY.TASK.
> MSI (s) (88:10) [00:03:07:357]: PROPERTY CHANGE: Adding
> hidden.Exec.Command property. Its value is
> '"C:\Windows\SysWOW64\SCHTASKS.EXE" /CREATE /SC MINUTE /MO 30
> /TN MyTask /TR "php \"C:\installDir\MyTask.php\"" /RU MyUser /RP password'.
> Action ended 0:03:07: create.MY.TASK. Return value 1.
>
> thanks
>



More information about the wix-users mailing list