Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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.

share|improve this question
add comment

4 Answers

up vote 1 down vote accepted

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.

share|improve this answer
add comment

psexec -s will run things as System but interactively on the current desktop.

share|improve this answer
    
No. The -s flag runs the remote process as a system account... not the psexec process on my local machine. –  Luca Matteis Aug 12 '10 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). –  Richard Aug 13 '10 at 7:58
add comment

You can have apache accept the EULA by running psexec with the -accepteula parameter

share|improve this answer
add comment

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

share|improve this answer
    
Have you even read the question? This may be a good answer for something else but certainly not this question. –  John Gardeniers Aug 19 '10 at 10:51
1  
Did you try the answer before downvoting? Commands started with "at" run under the System account. –  WilfriedVS Aug 19 '10 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... –  Evan Anderson Aug 19 '10 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. –  WilfriedVS Aug 20 '10 at 1:32
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.