1

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.

Carl Witthoft
  • 452
  • 5
  • 14
  • 3
    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
  • 1
    @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
  • 2
    @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
  • 2
    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
  • @CarlWitthoft To be fair, Windows doesn't actually know if a program has unsaved work or not. When you click a close button, Windows sends a signal to the program to tell it the user wants it to close. The program can do as it wishes with that signal. Usually, it shows a save dialogue. However it's also possible to send a force-kill signal, which immediately stops the program. This is standard functionality across all major operating systems (Linux, Mac, Windows, etc.). It's nothing Microsoft has specifically done. Also, you wouldn't enjoy living with an OS that couldn't force-kill programs ;) – Clonkex Sep 07 '19 at 13:36
  • @Clonkex yes, I am aware of the different level of kill signals. My objection is to the Microsoft remote Update being allowed to "kill -9" . – Carl Witthoft Sep 09 '19 at 14:52
  • Apologies for assuming you were a noob. But I would argue that I've seen many programs refuse to close nicely when asked, even without having unsaved data. I would be really unsure about relying on remote update without being certain that the reboot will actually take place. But on the other hand, I 150% get where you're coming from. I detest forced reboots _with a passion_ (so I really struggled with early Win10 releases - I lost so much work to that insanity). I just don't think Microsoft did anything wrong here by allowing your IT department to force restart. – Clonkex Sep 09 '19 at 22:45

1 Answers1

2

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
nixda
  • 26,823
  • 17
  • 108
  • 156