Page 1 of 1

Run CMD as Network service account and execute commands without interaction

Posted: 16 Apr 2020 09:00
by krish.badder123
Hi team,

i have a requirement that need to run the CMD as network service account and executes few commands automatically without interacting with the CMD.

i used below command which launches cmd as network service account but after the i need the run the commands on the cmd window manually, but i need these commands to run without my interaction.

PsExec.exe -i -u “NT AUTHORITY\NETWORK SERVICE” cmd

Re: Run CMD as Network service account and execute commands without interaction

Posted: 16 Apr 2020 13:11
by aGerman
Batch can't interact with the graphical user interface. It can't emulate key strokes and it can't emulate mouse input.
So, either the tool you call remotely has a command line interface that allows to pass all the necessary data as arguments when you call it, or you're likely out of luck.

Steffen

Re: Run CMD as Network service account and execute commands without interaction

Posted: 17 Apr 2020 14:08
by Eureka!
Use a scheduled task?