When shutting down your Windows 7 or Windows 10 PC by clicking the "Shut down" button, you may encounter a dialog box prompting "X programs still need to close:" and asking if you want to force shut down or cancel. To cancel and block this force shutdown prompt, follow this step-by-step guide.
Step 1: Open the Local Group Policy Editor.
Press the Windows + R keys to open the Run dialog box, type gpedit.msc, and press Enter.
Step 2: In the Local Group Policy Editor, navigate to the following path:
Computer Configuration > Administrative Templates > System > Shutdown Options.
Locate Turn off automatic termination of applications that block or cancel shutdown on the right panel and double-click on it.
Step 3: Select the Enabled option to block the force shutdown prompt. Then, you can shut down your PC to verify if it shuts down directly without prompting.