Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

My company seems to be hit by a virus that calls shutdown -r on all workstations. Until IT figures it out, I want to:

  1. run a console program (shutdown-a) every minute
  2. without it flashing a cmd.exe window on the screen.

Any suggestions?

share|improve this question
up vote 4 down vote accepted

Seeing the timing does not have to be exact, I would just write a batch file like.

shutdown -a
ping -n 60
Goto Start

You do get one cmd prompt on-screen (which can be minimised), but it doesn't keep flashing up.

share|improve this answer
cool. I like the 'think outside the box' approach. – Cristi Diaconescu May 11 '10 at 12:02

Could it be this problem

Can you move shutdown.exe out of C:\windows\system32 temporarily? I do that on my XP machine and then from the command line shutdown -a fails, can't find the command

Running a command minimized

share|improve this answer
Actually, it's probably because his company is using McAfee Anti-Virus. The DAT file pushed today is bad. McAfee Community Thread and ArsTechnica Discussion – afrazier Apr 21 '10 at 18:18
Yep. Big plus to @afrazier. Those were a few fun days for everybody (especially the IT guys) in the company... Thanks McAfee! – Cristi Diaconescu May 11 '10 at 12:33

If you're able to install things, or just have python lying around anyway (Because let's face it, why not?)

import time, os
while 1:
    os.system("shutdown.exe -a")

Save that in a .pyw file, and run it. (I used this very basic idea to make a full-on scheduler a-la cron, to do all sorts of neat things. Useful!)

share|improve this answer

Your Answer


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.