Interactive command prompt as NETWORK SERVICE
Asked Answered
H

2

18

How do I open an interactive application, such as cmd.exe or Windows Explorer, running as NETWORK SERVICE? There are ways to do it for the SYSTEM account, but NETWORK SERVICE is proving to be a challenge. I need this to work on Windows 7, but would be interested in solutions for other Windows versions as well.

Hoad answered 11/11, 2010 at 3:41 Comment(1)
I wish I could upvote this question & answer more times. psexec is my new favourite toy!Cyclostome
M
22

Have you tried PsExec, a couple of interesting links with more information:

Monda answered 11/11, 2010 at 6:11 Comment(3)
Wow, I totally didn't realise it would would work with the -u option with a "special" user (for which I don't know the password), but it did. It worked on Windows 7 x64 and Windows XP x86, though failed on Windows XP x64 as your linked post mentions. Still, it's good enough for my purposes.Hoad
One windows 2008 R2 psexec cmd launches a separate command prompt window. psexec -u "nt authority\network service" cmd.exe launches a command prompt in the same console window. Running a GUI program from that instance of cmd.exe or directly from psexec -u "nt authority\network service" will start the process, but not display it. I have UAC turned off.Wedding
Justin, add in a -i to your commandline, e.g. psexec -i -u "nt authority\network service" cmd.exe Cyclostome
I
5

Here is how you would use PsExec to run cmd.exe under "NETWORK SERVICE" user context:

psexec -i -u "nt authority\network service" cmd.exe 
Ideality answered 2/6, 2017 at 19:20 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.