- Завершение работы
- Уведомления о завершении работы
- Блокировка завершения работы
- how to stop Windows shutting down/ blue screen
- Replies (1)
- Windows 10 PC will not Shutdown or Restart
- Windows PC does not shut down or restart
- Windows 10 will not shut down
- How to prevent Windows 10 from shutting down
- Replies (18)
Завершение работы
Существует три способа завершения работы приложения на локальном или удаленном компьютере:
- Завершение работы системы
- Завершите работу системы и перезапустите ее
- Завершите работу приложения, выключите и перезапустите систему и перезапустите все приложения, которые были зарегистрированы для перезапуска.
Чтобы завершить работу системы, используйте функцию ExitWindowsEx с _ флагом завершения работы евкс. Пример см. в разделе Завершение работы системы. Чтобы завершить работу и перезагрузить систему, используйте _ флаг перезагрузки евкс. Чтобы перезапустить все приложения, которые были зарегистрированы для перезапуска с помощью функции регистераппликатионрестарт , используйте _ флаг ЕКСВ рестартаппс.
Функции инитиатешутдовн, инитиатесистемшутдовни инитиатесистемшутдовнекс запускают таймер и отображают диалоговое окно, предлагающее пользователю выйти из системы. При отображении этого диалогового окна функция абортсистемшутдовн может прерывать таймер и предотвращать завершение работы компьютера. Однако если срок действия таймера истекает, компьютер завершает работу. Эти функции также могут перезапустить компьютер после завершения операции отключения. Дополнительные сведения см. в разделе Отображение диалогового окна «завершение работы».
Уведомления о завершении работы
Приложения с окном и очередью сообщений получают уведомления о завершении работы через сообщения WM _ Куерендсессион и WM _ ENDSESSION . Эти приложения должны возвращать значение true , чтобы указать, что они могут быть завершены. Приложения не должны блокировать завершение работы системы, если это не является абсолютно необходимым. Приложения должны выполнять необходимую очистку при обработке WM _ ENDSESSION. Приложения с несохраненными данными могут сохранить данные во временном расположении и восстановить их при следующем запуске приложения. Рекомендуется часто сохранять данные и состояние приложений. Например, автоматическое сохранение данных между операциями сохранения, инициированными пользователем, для уменьшения объема данных, сохраняемых при завершении работы.
Консольные приложения получают уведомления о завершении работы в своих подпрограммых обработчиков. Чтобы зарегистрировать обработчик консоли, используйте функцию SetConsoleCtrlHandler .
Приложения службы получают уведомления о завершении работы в своих подпрограммых обработчиков. Чтобы зарегистрировать обработчик управления службой, используйте функцию регистерсервицектрлхандлерекс .
Блокировка завершения работы
Если приложение должно блокировать потенциальное завершение работы системы, оно может вызвать функцию шутдовнблоккреасонкреате . Вызывающий объект предоставляет строку причины, которая будет отображаться пользователю. Строка причины должна быть короткой и ясной, предоставляя пользователю сведения, необходимые для принятия решения о необходимости продолжения работы системы.
how to stop Windows shutting down/ blue screen
my new netbook keeps shutting down and the blue screen appears. i have installed Blue screen View which tells me when it crashed and why. But being a novist i have no idea what any of the messages mean, its happened three times today: the bluescreen viewer describes the ‘bug check string’ (which i have no idea what that is) as: UNEXPECTED KERNEL MODE TRAP
DRIVER OVERRAN STACK BUFFER
MEMORY MANAGMENT.
please can some one help me identify the problem
Replies (1)
I will require some additional information to assist you better.
Ø Have any changes been made to your computer recently?
Ø Did you install any drivers recently?
Follow the instructions below which might help you in resolving the issue.
Try to unplug all the external hardware devices from the machine and then start the computer.
Sometimes, an external hardware may also cause the issue during boot process.
Try performing Memory Diagnostics, Ref:
Follow the instructions below and check if you are able to boot your computer to desktop in safe mode.
1. Turn the computer on or Restart the computer
2. Start tapping the F8 key. The Windows Advanced Boot Options Menu appears.
If you begin tapping the F8 key too soon, some computers display a «keyboard error» message. To resolve this, restart the computer and try again.
3. Ensure that the Safe mode option is selected.
4. Press Enter. The computer then begins to start in Safe mode.
If you have made any changes in drivers recently then go ahead and follow the instructions in the step 1 or else perform the instructions in step 2 to restore your computer to an earlier state.
Step 1:
1. Open Device Manager from the Control Panel
2. In Device Manager , locate the device that you want to roll back the driver for.
3. After finding the hardware you’re rolling back the driver for, right click on the device’s name or icon and click on Properties.
4. In the Properties window for the device, click the Driver tab.
5. On the Driver tab, click the Roll Back Driver button.
Note: If the Roll Back Driver button is disabled, Windows vista does not have a previous driver to roll back to so you won’t be able to complete this process.
6. Click the Yes button to the «Are you sure you would like to roll back to the previously installed driver software?» question.
7. Click the Close button at the bottom of the device properties screen.
8. Click Yes on the System Settings Change dialog box that says «Your hardware settings have changed. You must restart your computer for these changes to take effect. Do you want to restart your computer now?»
9. Your computer will now automatically restart.
Step 2:
Follow the instructions below to restore your computer to an earlier state.
- Click Start, type system restore in the Start Search box, and then click System Restore in the Programs list.
- If you are prompted for an administrator password or confirmation, type your password, or click Continue.
- In the System Restore dialog box, click next.
- In the list of restore points, click a restore point that was created at least one week before the current date, and then click next.
Note: If you do not find a restore point that is at least one week old, select the earliest restore point that is available.
Check if the issue is resolved.
Please post back and let us know if this has helped to resolve your issue.
Windows 10 PC will not Shutdown or Restart
When you click on the Windows 10 Shutdown or Restart button, and you find that your Windows 10 will not shut down or restart, then this post will help you troubleshoot and fix the problem. It may go as far as the teal-colored screen, where it displays Shutting Down … or Restarting… and then remain there. In other words, your Windows 10/8/7 may during shut down, freeze or the activity circle on the screen may continue to move – and the only way to shut it down is to press the Power button to power down the system.
Windows PC does not shut down or restart
Here are a few valid reasons that may be prolonging or preventing a Windows shutdown or restart.
1. If yours is a new Windows install, maybe “OOBE” is taking its time. This is especially true in the earlier versions of Windows. In the initial days, when you try to restart or shut down a Windows-based computer, the system may take a long time to restart or to shut down.
Alternatively or additionally, you may receive a message that resembles the following: Windows is configuring updates. This usually occurs 1-2 days after you first start Windows – or sometimes after a Windows Update. The problem occurs because the system has to perform maintenance functions, to delete unnecessary files. Typically, this process will occur one or two days after the Out Of Box Experience (OOBE) Wizard runs. When this problem occurs, it may take as long as 10-20 minutes to shut the system down. The process occurs only one time. So just wait for the process to finish once.
2. If you’ve updated your Windows, maybe the Updates are taking a little longer than expected time to configure or install. Best to let the system take its own sweet time, as it only a temporary situation.
3. Have you set Windows to delete Page (Swap) file at every shutdown? If so then this process will take some time. You may use this Microsoft Fix It to enable or disable the deletion of the Page File. In this case, you will have to make Windows stop deleting the Page File at every shutdown. While on the subject, this post on how to Disable, delete, recreate paging file in Windows may also interest you.
Windows 10 will not shut down
But if you think that the problem is something else and is a recurring one, then here are the possible reasons:
- One of your processes or services is not shutting down.
- You have a faulty or incompatible device driver installed.
- You have a faulty or incompatible program running.
Here are a few suggestions which you may consider, not necessarily in the order mentioned, that will help you troubleshoot the problem. Please go through the entire list first and then see what may apply to you.
1. Undo any recent changes which you may have made to your system. You may have to uninstall a recently installed program or an update or a device driver.
2. Try a Last Known Good Configuration or a System Restore.
3. Use the Task Manager to try manually and identify the probable cause or causes for this. Manually stop and quit the suspect program, and then shut down to see if the issue is being resolved. You may have to repeat the procedure with several running processes.
4. Enter Safe Mode. From the Menu, move the cursor down to Enable Boot Logging and hit Enter.
On reboot, search for the ntbtlog.txt file in C:\Windows folder. Look for any signs of problems loading device drivers. If you find problems, go into Device Manager and disable the device or uninstall the program. Reboot. If the problem does not occur then you know, it was that device or program causing problems.
6. Perform a Clean Boot to troubleshoot the problem. This may help you identify offending third-party processes that is stopping your Windows from shutting down or restarting normally.
5. Upgrade the Computer’s CMOS/BIOS. Faulty CMOS and BIOS settings can cause startup and shutdown problems.
6. If you have a computer that is running Windows 7. When the system is under heavy load, you may encounter a problem where Windows 7 stops or the keyboard responding when you shut down the computer or put the computer to Sleep. This problem frequently occurs on computers that have multiple processors or that have a processor with multiple cores. In this case, apply the hotfix from KB977307.
7. Enable Verbose Status Messages. This will help you identify, at which point Windows stops the shutting down process.
8. Enable the Shutdown Event Tracker in Windows 10/8/7 so as to be able to analyze your system shutdown process.
9. Run Performance Troubleshooter and see if it helps you. Type the following in Run box and hit Enter to open it.
10. View the Event Logs using the built-in Event Viewer or our freeware Windows Event Viewer Plus to do so easily. Maybe you will find something in the Event Logs.
11. If you are running Windows 10/8, disable Hybrid Shutdown and see if it helps.
12. Use the Emergency Shutdown or Restart option in Windows.
13. Reset BootExecute registry value and see it this will solve your shutdown problems.
14. Windows 10 users may want to check if their Management Engine Driver for Intel is updated to the latest versions.
UPDATE: Please read the comment by gogopogo below.
How to prevent Windows 10 from shutting down
I am often away for several days at a time. I want to be able to access my PC remotely using Logmein during this period.
I have Windows update set to download but only to update when I choose to.
Restart options: no custom restart time.
check Give me updates for other MS products
not checked: defer feature updates, use my sign in info
Updates delivered from more than one place: On
Power settings are : PC goes to sleep: Never.
Nonetheless I still find the PC shut down after some time, I think less than a day.
How can I keep it on always?
***Post moved by the moderator to the appropriate forum category.***
Replies (18)
* Please try a lower page number.
* Please enter only numbers.
* Please try a lower page number.
* Please enter only numbers.
You may refer to the following methods to prevent your PC from shutting down:
Method 1: Disable sleep mode through Settings.
- Click on the Start button and select Settings.
- Click on System >Power & sleep.
- Under the Sleep section, expand the drop-down menu and select Never.
Method 2: Disable sleep mode through Power Options.
- Type power options in the search box, and then press Enter to open the Power Options window.
- On the left pane, click on the Change when the computer sleeps link.
- Expand the drop-down menu next to Put the computer to sleep, select Never for On battery and Plugged in.
- Click the Save changes button.
Method 3: Change advanced power settings through Power Options.
- Type edit power plan in the search box, and then press Enter.
- Click on the Change advanced power settings link.
- Make sure that the Critical battery action and Low battery action settings under Battery are set to Do nothing.
Keep us updated on the results.
11 people found this reply helpful
Was this reply helpful?
Sorry this didn’t help.
Great! Thanks for your feedback.
How satisfied are you with this reply?
Thanks for your feedback, it helps us improve the site.
How satisfied are you with this reply?
Thanks for your feedback.
As I said : » Power settings are : PC goes to sleep: Never.»
2 people found this reply helpful
Was this reply helpful?
Sorry this didn’t help.
Great! Thanks for your feedback.
How satisfied are you with this reply?
Thanks for your feedback, it helps us improve the site.
How satisfied are you with this reply?
Thanks for your feedback.
Have you checked your advanced power settings through Power Options and made sure that the Critical battery action and Low battery action settings under Battery are set to Do nothing?
2 people found this reply helpful
Was this reply helpful?
Sorry this didn’t help.
Great! Thanks for your feedback.
How satisfied are you with this reply?
Thanks for your feedback, it helps us improve the site.
How satisfied are you with this reply?
Thanks for your feedback.
There are no battery options, this is a desktop PC which is always plugged in.
Windows 10 Pro 64-bit, Intel Core i7, 16GB, ASRock, one SSD, two HD, Device Manager reports no devices with warnings. System Failure setting is to dump and automatically restart.
Take this morning for an example. I left it on yesterday. It was still on at 11pm last night. At 08:30 this morning it was shut down and it did not wake with a keypress (meaning it would had been sleeping) but needed a power button press. Normal start up, no message «Windows did not shut down properly».
The last events for Event 1047 yesterday in the Window event logs are below.
What is the «Button or Lid» reason? nobody was in the room at the time.
It seems to happen to others too:
Information 21/02/2017 22:09:24 Kernel-Power 107 (102) The system has resumed from sleep.
Information 21/02/2017 22:09:23 Hyper-V-VmSwitch 24 (1017)
Information 21/02/2017 22:09:23 Hyper-V-VmSwitch 24 (1017)
Warning 21/02/2017 22:09:23 Hyper-V-VmSwitch 22 (1015)
Information 21/02/2017 22:09:23 Hyper-V-VmSwitch 24 (1017)
Information 21/02/2017 22:09:23 BROWSER 8033 None
Information 21/02/2017 22:09:22 Kernel-Power 42 (64) The system is entering sleep. Sleep Reason: Application API
Information 21/02/2017 22:09:21 Winlogon 7002 (1102)
Information 21/02/2017 22:09:21 User32 1074 None
The process C:\WINDOWS\system32\winlogon.exe (OPENX) has initiated the power off of computer OPENX on behalf of user OpenX\Patrick for the following reason: No title for this reason could be found
Reason Code: 0x500ff
Shutdown Type: power off
Comment:
Error 21/02/2017 22:09:21 DistributedCOM 10010 None The server <9ba05972-f6a8-11cf-a442-00a0c90a8f39>did not register with DCOM within the required timeout.
Error 21/02/2017 22:09:18 DistributedCOM 10016 None
Information 21/02/2017 22:09:18 Kernel-Power 109 (103)
The kernel power manager has initiated a shutdown transition.