You might have often seen that when you shutdown your Windows, all open applications are also terminated with it. But if you want that you should be asked to save you work before system goes to shutdown, you can easily enable this setting. You will need to make simple changes in the registry configuration.
First of all launch the Group Policy Editor, you can launch it by clicking Start, typing gpedit.msc and pressing Enter.
Now navigate to Computer Configurations > Administrative Templates > System > Shutdown Options.
Now, you will be able to see Turn off automatic termination of applications that block or cancel shutdown option in the main window. Double click it and a dialogue box will be loaded, here you can set the behaviors for this option, choose Enable and click Apply.
Now, your running applications will not be terminated during system shutdown, rather first you will be asked to save you work. Enjoy!