Skip to content

BAT job hangs on hidden "Terminate batch job (Y/N)?" #63

@panreyes

Description

@panreyes

I copied serviceui.exe in C:\ and used this script to launch cmd.exe as SYSTEM but making it available in the user session at the same time.

C:\serviceui.exe -process:explorer.exe "c:\windows\system32\cmd.exe"

But it hanged up and the agent wasn't able to complete the job. (And it even triggered the job again every few minutes, I don't know why.

By running the generated bat file, I noticed that if I closed cmd.exe with the X instead of the exit command, this would be shown:

Terminate batch job (Y/N)?

To make it work correctly, I did a small change in modules_meshcore/scripttask.js.

From this:

child.stdin.write(pName + ' > ' + oName + '\r\n');

To this:

child.stdin.write('echo n | ' + pName + ' > ' + oName + '\r\n');

It's not the most ellegant solution, but it seems to be currently working for me :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions