locked
Task Scheduler successfully completed with return code 128. RRS feed

  • Question

  • Hi All, 

    Below is my bat file to kill the particular process using task scheduler.

    taskkill.exe /S IPADDRESS1 /U ADMINISTRATOR  /P "PASSWORD" /IM THEPROGRAME_NEED_TO_KILL.exe /F
    taskkill.exe /S IPADDRESS2 /U ADMINISTRATOR  /P "PASSWORD" /IM THEPROGRAME_NEED_TO_KILL.exe /F
    taskkill.exe /S IPADDRESS3 /U ADMINISTRATOR  /P "PASSWORD" /IM THEPROGRAME_NEED_TO_KILL.exe /F
    taskkill.exe /S IPADDRESS4 /U ADMINISTRATOR  /P "PASSWORD" /IM THEPROGRAME_NEED_TO_KILL.exe /F
    taskkill.exe /S IPADDRESS5 /U ADMINISTRATOR  /P "PASSWORD" /IM THEPROGRAME_NEED_TO_KILL.exe /F
    taskkill.exe /S IPADDRESS6 /U ADMINISTRATOR  /P "PASSWORD" /IM THEPROGRAME_NEED_TO_KILL.exe /F
    taskkill.exe /S IPADDRESS7 /U ADMINISTRATOR  /P "PASSWORD" /IM THEPROGRAME_NEED_TO_KILL.exe /F
    taskkill.exe /S IPADDRESS8 /U ADMINISTRATOR  /P "PASSWORD" /IM THEPROGRAME_NEED_TO_KILL.exe /F

    exit

    The error is showing like below

    Task Scheduler successfully completed task "\TASK_NAME" , instance "INSTANCE_NAME" , action "C:\Windows\SYSTEM32\cmd.exe" with return code 128.

    Do I able to know whether the task is working and kindly help to fix the issue.

    Thank you.

    Best Regards, 

    Tharaka <g class="gr_ gr_337 gr-alert gr_spell gr_inline_cards gr_run_anim ContextualSpelling ins-del multiReplace" data-gr-id="337" id="337">Wehalla</g>

    Friday, November 2, 2018 2:12 AM

All replies

  • The error code is being returned from taskkill process. Looks like 128 = There are no child processes to wait for

    https://docs.microsoft.com/en-us/windows/desktop/Debug/system-error-codes--0-499-

     

     



    Regards, Dave Patrick ....
    Microsoft Certified Professional
    Microsoft MVP [Windows Server] Datacenter Management

    Disclaimer: This posting is provided "AS IS" with no warranties or guarantees, and confers no rights.

    Friday, November 2, 2018 2:49 AM
  • Hi,

    In addition, make sure you set the 'Start in' and 'Program/script' options correctly.

    To set the 'Start in' option: Right click task in the task scheduler > Properties >  Actions > Edit.

    Where is the location of this file?

    If possible, move it to other location with admin permission.

    Regards,


    Please remember to mark the replies as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    Wednesday, November 14, 2018 8:12 AM