There are several reasons why you may need to cause your computer to be deadlocked. You can use the Windows "Notepad" editor to create a simple BAT file (also called a "batch" file) with the purpose of opening endless "Command Prompt" windows which will quickly run out of all hardware resources. system, especially free RAM memory, causing a temporary block of all computer functions. It is a good idea to experiment with this type of situation only on your own machines, even if it is simply a fun game or joke.
Steps
Part 1 of 2: Create the Batch File

Step 1. Launch the "Notepad" text editor
Type the keyword "Notepad" in the "Start" menu, then click on the corresponding app icon. Alternatively, go to the "Start" menu, scroll down to the "Windows Accessories" section and click on the "Notepad" option.
If you want, you can click on an empty spot on the desktop with the right mouse button, select the "New" item and choose the "Text Document" option

Step 2. Type the @echo off line of code
This is the first line of the program contained in the BAT file you are creating. This command is used to disable the repetition of commands.
After entering each line of code, you will need to press the Enter key

Step 3. Enter the code: crash
This will create the ": crash" label which will serve as the starting point of the program execution to create the loop that will crash the system.

Step 4. Type the command start as the third line of the program code
This way the BAT file will simply open a "Command Prompt" window.

Step 5. Type the line of goto crash code
This will be the fourth line of the source code of the BAT file. This command is used to instruct the program to return to the line identified with the "crash" label, to effectively create an infinite loop that will continue to open windows of the Windows "Command Prompt", causing the sudden exhaustion of memory Computer RAM.

Step 6. Save the text file in BAT format
You will simply have to change the extension of the text file by replacing it with that of the BAT files. Follow these instructions:
- Click on the "File" menu located in the upper left corner of the "Notepad" program window;
- Click on the "Save as …" option;
- Click on the "Save as" text field located at the bottom of the "Save" dialog box;
- Click on the "All files" option.

Step 7. Name the BAT file
You can choose the name you prefer by typing it into the "File name" text field. Make sure you add the ".bat" extension (without quotes) to the end of the name you have chosen.
If you don't know how to name your BAT file, you can choose one of the following names: "mobile.bat" or "caverna.bat"

Step 8. Click on the "Save" button
At this point you are ready to run your BAT file.
Part 2 of 2: Run a BAT File

Step 1. Save all open files
Running this type of BAT file will not cause any harm to your computer, however you will need to restart your system to get it back to normal operation. In this case, you may lose all the work that you have not yet saved.

Step 2. Close the windows of running programs
Again, you will need to save any open files you have edited before you can close the respective program windows.

Step 3. Click on the BAT file icon with the right mouse button
The corresponding context menu will be displayed.

Step 4. Click on the "Run as administrator" option
The BAT file you just created will be executed. Several "Command Prompt" windows will begin to appear on the screen.

Step 5. Turn off your computer
Since after a few seconds from the execution of the BAT file you will no longer be able to move the mouse cursor, to restore normal operation of the computer, you will have to force it to shut down by holding down the power key.

Step 6. When the computer has shut down, restart it by pressing the power button again
The computer will boot normally. You will have to wait a few seconds before you can reboot the system after shutdown.
Advice
- When you are ready to restore normal system operation, all you have to do is restart your computer.
- On Windows 10 systems, when you run this type of BAT file, there are several processes that will fail causing your hard disk usage to increase to about 100% and causing your computer to slow down overall. You can forcibly terminate the processes you want from the "Task Manager" window which you can access by pressing the key combination "Alt + Ctrl + Del".
Warnings
- While BAT files are completely harmless, creating an executable file with the sole purpose of deadlocking a computer other than your own could have unintended consequences.
- Before running the BAT file make sure you have saved all open documents.