Windows updates...Grrr!!!
조회 수: 4 (최근 30일)
이전 댓글 표시
Does Windows not see Matlab when checking to see if it can do an auto-restart to install updates? I read somewhere that Windows makes sure the computer is not busy before automatically restarting, but alas I came in this morning to find my overnight simulation had been aborted due to Windows installing updates!
:'(
댓글 수: 0
답변 (2개)
Star Strider
2016년 10월 13일
In Win 8.1 (and probably earlier version as well), in the Windows Control Panel, Windows Update gives you some control over this. In Control Panel —> Windows Update, click ‘Change Settings’ to control when the updates are installed. I get a notification on my Win 8.1 machine that Windows will install updates in a day if I don’t install them earlier.
You can access the Windows Update options in Win 10 by clicking on the ‘Windows’ icon in the left of the toolbar, and click on the ‘gear’ icon to access ‘Settings’. Then click on ‘Windows Update’ and explore the options.
That is likely as good as it gets.
댓글 수: 3
Star Strider
2016년 10월 13일
The Win 10 ‘Windows Update’ allows you to set a custom restart time. That’s probably the only option you have. You can get there through ‘Restart Options’. The problem is that it’s a real pain to have to do that each night if you want to run a long overnight simulation.
With respect to opinions on Win 10, your likely preaching to the choir here! I’ve vented my own frustrations with it from time to time. I refuse to ‘downgrade’ my Win 7 and Win 8.1 machines to Win 10.
Michael
2024년 5월 28일
편집: Michael
2024년 5월 28일
Windows has an API that enables a process that has a window to block a system shutdown indefinitely until the user manually chooses what to do next. Applications like Matlab receive shutdown notifications through the WM_QUERYENDSESSION and WM_ENDSESSION messages.
Matlab seems to ignore these messages. (Anyone with any clout at The Mathworks, please get them to act on the messages)
While we wait for this feature, I wrote a windows CMD batch file to stop Windows restarting:
for /f "tokens=1 delims=:" %%a in ('time/t') do set currentHour=%%a
if %currentHour% gtr 17 goto after6pm
if %currentHour% gtr 5 goto after6am
set /a startHour = %currentHour%+18
set /a endHour = %currentHour%+6
goto SetActiveHours
:after6pm
set /a startHour = %currentHour%-6
set /a endHour = %currentHour%-18
goto SetActiveHours
:after6am
set /a startHour = %currentHour%-6
set /a endHour = %currentHour%+6
:SetActiveHours
set "activeHours=%startHour%,%endHour%"
reg add "HKLM\SOFTWARE\Microsoft\WindowsUpdate\UX\Settings" /v "ActiveHoursStart" /t REG_DWORD /d %startHour% /f
reg add "HKLM\SOFTWARE\Microsoft\WindowsUpdate\UX\Settings" /v "ActiveHoursEnd" /t REG_DWORD /d %endHour% /f
If you save this as a batch file and use Task Scheduler to make it a Daily task, to run once an hour it will change your Active Hours so that Windows never restarts until you want it to.
댓글 수: 1
참고 항목
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!