I need to login as SYSTEM because my Apache runs a process as a SYSTEM (that's what I see in Task Manager) and I need to run that process from the command-line (psexec.exe) to accept the EULA popup, otherwise it will just hang on the Apache side.
4 Answers
As you cannot log in interactively as SYSTEM your best bet is to temporarily run Apache under a different account, accept the EULA (obviously for some other package, because Apache doesn't have such a popup), the reset it back to the SYSTEM account.
psexec -s
will run things as System but interactively on the current desktop.
-
No. The -s flag runs the remote process as a system account... not the psexec process on my local machine. Aug 12, 2010 at 9:33
-
@Luca: Yes. If you want to run multiple commands, use
psexec -s cmd
and have a command shell running as system, from where you can then run arbitrary commands (except Windows Explorer which gets confused about trying to be the shell).– RichardAug 13, 2010 at 7:58
You can have apache accept the EULA by running psexec with the -accepteula
parameter
Depending on which OS you use you can use the at command to schedule a job.
First get the local time with the "time" command.
Then schedule a job one minute later from the command line:
C:\Users\wilfriedvs>at 10:01 /interactive cmd.exe
-
Have you even read the question? This may be a good answer for something else but certainly not this question. Aug 19, 2010 at 10:51
-
1Did you try the answer before downvoting? Commands started with "at" run under the System account. Aug 19, 2010 at 18:55
-
+1 - That's a trick I've used since the NT 4.0 days to get a SYSTEM shell. I don't believe it works in Vista or newer Windows OS's, though... Aug 19, 2010 at 23:40
-
Vista or later can use "schtasks.exe" You can still use "at" but the command won't run interactively, I still use it to run vbs scripts as system. Aug 20, 2010 at 1:32