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 wrote a php script and configured the task scheduler to run it every 10 minutes. The annoying thing is that every time the task runs, a command-prompt (svchost) window pops up for a few seconds.

How can I make it run silently?

share|improve this question
add comment

3 Answers 3

It sounds as though you're running the script under the security context of your logged-on user. If you can get away w/ running the script as "SYSTEM" then you won't see the pop-up window. You can also make a dedicated user account with the least amount of privilege and run the script under that account (which is actually the right thing to do), but running it as SYSTEM can be expedious.

share|improve this answer
add comment

Eric Phelps wrote something on this a while ago: slightly dangerous playing around with windows script host and using wscript.exe to invoke your PHP command via the CreateObject("Wscript.Shell").Run method, I say slightly dangerous because Task Manager doesn't know about the shell and can't track it.

http://www.ericphelps.com/batch/samples/invisible.txt

share|improve this answer
add comment

You can also just run that command prompt box minimized :)

share|improve this answer
add comment

Your Answer

 
discard

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