Wednesday, August 27, 2025

Using Command and Script for Shutdown Window

+Using the Run Dialog or Command Prompt (One-Time Timer) 

    1. Open Run:
    Press the Windows key + R to open the Run dialog.
    2. Enter the command:
    Type shutdown -s -f -t [seconds] into the dialog box.
        Replace [seconds] with the number of seconds for your desired shutdown time (e.g., 3600 for one hour, 300 for five minutes). For an immediate shutdown, use 0.
    3. Press Enter:
    Click OK or press Enter to schedule the shutdown. A notification will appear confirming the scheduled shutdown.
    4. To cancel:
    Open the Run dialog again (Win + R) and type shutdown -a. Press Enter to cancel the pending shutdown.
+Using Script
    -Open Notepad and write
        @echo off
        shutdown -s -f -t 1800
        @echo off
    -save file .bat