Run CMD as Network service account and execute commands without interaction

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
krish.badder123
Posts: 1
Joined: 16 Apr 2020 08:50

Run CMD as Network service account and execute commands without interaction

#1 Post by krish.badder123 » 16 Apr 2020 09:00

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

aGerman
Expert
Posts: 4654
Joined: 22 Jan 2010 18:01
Location: Germany

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

#2 Post by aGerman » 16 Apr 2020 13:11

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

Eureka!
Posts: 136
Joined: 25 Jul 2019 18:25

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

#3 Post by Eureka! » 17 Apr 2020 14:08

Use a scheduled task?

Post Reply