Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

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

I may be asking the wrong question, so some background: my company's IT pushes patches overnight, and either their scripts or Win7's built-in updater controls then force-restart my machine, killing all running jobs without saving anything. That's obviously bad from my point of view.
So: is there a way to set up a daily task in Task Scheduler that kills my Ethernet connection (and a matching task to re-enable it later on)? I am trying to alter various Registry items and Local Group Policy settings to block "remote wake" and so on, but suspect that I don't have sufficient Admin power to do so.

For that matter, if there's a foolproof way to block any and all forced restarts, I'd like to know that as well.

EDIT: I have modded the Registry as described in one of the links in Stop Windows 7 from forcefully shutting itself down when waiting to update , but have yet to see if that is sufficient.

share|improve this question
Your IT department clearly do this for a reason. If you have a problem with it, take it up with your head of IT. – Simkill Jan 18 '13 at 13:49
@Simkill your response is counterproductive and unnecessarily hostile. If you really think IT departments are doing things right, you haven't worked in the real world much. I'm perfectly capable of enabling a restart on my own when notified. What I do NOT want is for some random, poorly-thought-out script to kill my work for no good reason. – Carl Witthoft Jan 18 '13 at 13:52
@CarlWitthoft, your response in unnecessarily hostile also. Apart from the obvious suggestion of "save everything before you leave" - which I assume you're smarter than - you're seriously better off discussing it with your IT team. The updates they are pushing out are most likely not just so they seem productive, and these things do often require the reboot. Just because you're smart enought o know what's going on, doesn't mean your whole company is - and unfortunately in the world of mass-management, the lowest common denominator wins every time. – LuckySpoon Jan 18 '13 at 13:59
Your machine restarts to verify updates are installed in a timely manner. If you go on holiday and leave your machine on, your PC will be open to attack for an extended period of time. I once had to work with the 4 other people in my team from 5pm until 4 in the morning to disinfect Conficker-C from 75 PC's across 2 buildings because the IT guy on site didn't make sure his windows updates were installed in a timely manner. Because it spread over the network automatically, we had to clean each PC individually, taking them all off the network. They lost an estimated £450,000 in revenue. – Simkill Jan 18 '13 at 14:05
I apologize for my quick-shot response. Yes, it's important to update machines, but not with the speed you claim to need. If my machine is sleeping comfortably, what's the downside to banning a restart until it wakes up and I can control the shutdown in an orderly manner? And yes, it's Microsoft's fault for allowing anything to force-kill without saving. Yes, I save documents in general, but again nothing should allow a shutdown without allowing user interaction to save things. The normal Win7 shutdown/restart certainly yields to applications. – Carl Witthoft Jan 18 '13 at 15:25
up vote 1 down vote accepted

You can create two batch files and schedule them with two tasks

  1. Open cmd.exe and type netsh interface show interface to look up the right interface name
  2. Copy & paste each line in a seperate textfile and save them as enable.cmd and disable.cmd
    netsh interface set interface myinterface disabled
    netsh interface set interface myinterface enabled
    Replace myinterface with your own interface name
  3. Press Win+R and type taskschd.msc
  4. create two normal tasks and point them to your batch files
  5. Modify the trigger to execute the task at your desired time
share|improve this answer
Thank you; and I promise all of you I won't subvert the IT patch-rollouts themselves! – Carl Witthoft Jan 18 '13 at 16:14

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .