Showing posts with label computer shutdown. Show all posts
Showing posts with label computer shutdown. Show all posts

How To Create Batch File Or Script In Windows

How To Create Batch File Or Script In Windows

I am going to tell you steps to create a small batch file. 
{ Flow These Steps }

1. Open a new notepad file. You can also use any similar text file editor, like Notepad++.
2. Type the following commands in the text file:

echo off
title Hello World
show title at top
echo File Executed
echo all Done
pause
3. Save the text file with the extension .bat instead of .txt




4. To Run the batch file, simply double-click it. The CMD Window will open automatically with the desired output.


I Am Going to Create Some Batch File for Help to You

1. Shutdown window system batch file

shutdown.exe /s /t 00

2. Create a batch to generate Energy Report

powercfg/energy
                            
C:\WINDOWS\system32\energy-report.html

Save the file as energyreport.bat or any name you like. Keep in mind you use the correct file extension.

3. Create batch file to generate Battery Report

powercfg /batteryreport
                            
C:\Windows\System32\battery-report.html

Save the file as batteryreport.bat or any name you like.

Automatically and Schedule Shutdown Your Computer System

Automatically Shutdown your Computer after specific time using Windows Command Prompt You do not need a third party software to automatically shutdown your computer, because you can schedule your system shutdown using the command prompt.
The SHUTDOWN command does everything. The command can be used to shutdown, restart, logoff and hibernate your local computer or a remote PC connected to your network.
Follow the Steps:

How to schedule system shutdown
Open the “cmd” window, to open the command prompt, press Win key + R, type cmd and hit Enter 2. Now type the following command, the below command shuts down the computer after 1800 seconds {30 minutes}
Shutdown /s /t 1800 – This command will shut down you computer in 30 minutes
Shutdown /s /f /t 1800 – This command will force shut down your computer in 30 minutes, which means all running applications will be closed without getting on notification

Auto Shutdown PC Using CMD
Shutdown is the common command to perform Shutdown, restart, logoff or hibernate operation
/s – means, shutdown other commands are listed below  /r – restart   /p – shutdown without a warning  /h – hibernate   /l – logoff    /a – abort a scheduled shutdown  /t command is used to set the timer.
Aborting a scheduled shutdown
If you want to cancel a scheduled shutdown you can type the following command in the cmd window shutdown /a