I just had to post this when I had the idea after Windows 10 asked me to reboot my computer again, and I dreaded when it automagically reboots.

Problem: Windows Active hours are only 12 hours max. For contractors like me, this sucks. My active hours for work are 8AM to 12AM. Many people have said that it checks if it's outside your hours to see if there's activity, so you don't need it. Bull! I went upstairs outside of my active hours to make some coffee. And came back to find my computer unusable for over an hour while it did it's thing. Unacceptable! I could turn updates off- I found something to do that. But not to extend my active hours.

Solution: I found the registry key, tested it, and it does actually set the hours in the app. Not sure if it works beyond 12 hours though... but I came up with my idea for the NANY entry... an interface that allows you to set your active hours to however long you want to set it. Then, every hour on the half hour to make sure I don't miss it, it updates your Active Hours start to 1 hour after your span, and updates the end to 1 hour after your revolving end. Basically using the algorithm: -6 hours < current time < +6 hours.

I can be the change I want to see! Hopefully, it won't trigger the Microsoft update to fix the hole in their scheme.

If someone doesn't want to wait for me to do it, the keys are as follows:

Save it as .bat, place it in not-a-temporary place, and create a scheduled task in the Task Scheduler (Windows+R > taskschd.msc > Enter) which'll run it, say, every 8 hours (one hour before the changed active hours end time). Here is one way to create it which can ensure regular runs:1. Create new task2. General tab: set user account to SYSTEM OR User with highest privileges and check "Run whether user is logged on or not"3. Triggers tab: 2 options:A. 2 triggers - a. "On a schedule" + One time (choose any time for the 1st run) + Repeat task every 8 hours for a duration of "Indefinitely" b. "At log on of any user" (this ensures not missing the active hours reset when you reboot)B. 1 trigger - "At log on of any user" and set to repeat every 8 hours indefinitely4. Actions tab: Start program: Set the path of the file (use quotes if the path has spaces)5. Conditions tab: Uncheck "... only on AC power"6. Settings tab: Check "Run task as soon as possible after a scheduled start is missed" (further ensures that you don't miss active hours reset if the task fails to run as per schedule)

^If you like you may set the task to run every hour indefinitely instead of eight, but I'd say it'll be a bit of an overkill.

I haven't had any updates since I've put my task up, so can't confirm if its working. However, if cbarn's script works, this should too.

PS: If you just want to import the task that I've made, here is my task's xml code (save it as an .xml and import in the Task Scheduler):

Apparently, my fears came true. All of a sudden, though the registry keys are set correctly, it stopped updating in Windows. I thought it might be the tweaks I did to get it to not restart at all, but I tried on a machine that I'd not put those tweaks on. So, as a result, even though the NANY is done, I won't be releasing it.

A little more information:

Formerly, when I ran the application and changed the times, it would show up in the registry and in the interface. Now, it only shows up in the registry, and the interface in the active hours is set back to default, i.e. 8AM - 5PM. The only time it used to do this was if I tried to set it for longer than 12 hours. If I set it through the regular interface, it does indeed use those registry entries. But with the interface acting strange, I don't feel comfortable releasing it for anyone's use.

To the best of my knowledge, answer #5 here, works well, and involves setting up a scheduled task that runs every 10 minutes and disables the scheduled task that is the automatic reboot task, after an update. I made only one change to the task, and that is for when that task starts running (at startup instead of some specific time of day set by original author).

No additional scripts, .bat files, or programs are needed, other than just importing this scheduled task, and manually running it the first time (or rebooting).

I don't care if it reboots. If I turn off reboots, then I'm likely not to do it for a long while. And if it installs and doesn't reboot, no other windows installer based installers will work because it will have pending installer actions. I just want to shorten the window. Right now I have it so it doesn't reboot, and a few times I've either not been able to install something, or had strange effects because I haven't rebooted yet.

There are quite a few threads out there on this issue, but no real authoritative source; I guess because they don't really want you to get around it.

On another point, it would seem that these scripts that were posted above should be more rightly posted in the Windows 10 thread, as most won't see them in this thread dedicated to a NANY entry. And I've posted what I did to get it not to reboot there, and am using it currently. Just a thought.

Wasn't sure where to post this, so this thread seemed most related: Sjc1000 recently linked to an article in the IRC channel which says there will be an update which allows Windows 10 Pro/Enterprise to set Active Hours to 18 hours instead of only 12. So that's an improvement.