How to speed up and cleanup Windows 10/11 using the command line

We show you how to run dialog commands that speed up and clean up your Windows.

In this guide we show you practical run dialog commands that speed up and clean up your operating system - automatically and almost free of mouse clicks.

Tuning tools included in Windows, sometimes hidden, help when the PC is stalling: they can be accessed by searching for their name in the start menu, or alternatively using the Run, CMD or PowerShell command. Some examples: With magnetic hard drives, it is advisable to defragment them from time to time: You can do this using dfrgui.exe. You can also help old PCs to turbo by deactivating graphical effects (systemPropertiesPerformance.exe). taskmgr.exe loads the task manager and, since Windows 8, has allowed you to clean up the autostart - more effective free tuning is usually not possible (under Windows 7, the autostart was optimized using msconfig.exe).

What the commands mentioned have in common is that you can call up the associated optimization tools even without the EXE part in the name - and that they do not in themselves achieve any acceleration: a window opens with a graphical user interface, in which further interactions are required via mouse clicks.

Below we will introduce you to some time-saving tuning commands - optimized tuning, so to speak: Type in the command, wait and enjoy more speed.

First, open the Run dialog with the Windows key and R. Depending on where the problem is, a specific command will release the brake - there are hardly any or no clicks required.

  1. Run autostarts immediately

Problem: Windows 8.1, 10, and 11 wait 10 seconds or more before starting to run startup programs; Windows 7 loads them immediately.

Solution: You can achieve behavior comparable to Windows 7 via a registry intervention; a guide describes the procedure. You save yourself the hassle of fiddling with the registry editor. Just type or paste: cmd /k reg.exe add HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Serialize /v StartupDelayInMSec /t reg_dword /d 0x0 /f & exit

Explanation/Note: The tip above is a (!) command, so copy the entire bold text block to the clipboard and put it in the Run dialog. Similarly, the commands mentioned below are one-liners; in this article they appear on several lines because of a break.

Now what exactly does the above command do? cmd calls the command line, the /k parameter allows executing a command line command (if cmd.exe loads indirectly via the run dialog). reg.exe and the parameters behind it create a subkey "Serialize" in the registry under "HKEY_CURRENT_USER" in the area "Software\Microsoft\Windows\CurrentVersion\Explorer" - and in it the DWORD entry "StartupDelayInMSec", whose value is 0. The entry defines the waiting time in milliseconds for the autostart charging to begin. By default, neither the "Serialize" key nor the DWORD entry mentioned exists in the registry; However, current OSs wait at least ten seconds ex works until they load autostarts.

  1. End hanging programs

Problem: Sometimes programs hang. They continue to use up RAM but are no longer usable.

Solution: One command ends any problem applications in one go: taskkill /F /FI "STATUS eq NOT RESPONDING"

Explanation/Note: This does not work with all programs. If closing a software using the context menu of its taskbar icon doesn't work, taskkill is worth a try; Programs that run smoothly remain loaded.

  1. Shut down performance-hungry browsers

Problem: Browsers are almost all-rounders, which is reflected in their RAM consumption. Multiple instances of Firefox & Co. often require hundreds of megabytes. This is especially true for 64-bit browsers, which tend to be resource hungry.

Solution: Use the Run dialog to call up the taskkill command line tool, which closes all instances of an EXE file to be specified - or terminates the corresponding RAM processes. The routine skips programs that are not loaded - but Windows deletes what is running in browsers:

taskkill /f /im firefox.exe /im chrome.exe /im iexplore.exe /im opera.exe

Explanation/Note: The command kills Firefox, Chrome, Internet Explorer (IE) and Opera. The /f parameter stands for "force" - and forces the termination. Enforcing has the advantage of suppressing possible "Are you sure" queries; Programs like IE or Opera warn when closing if several tabs in each browser would disappear (and the editor asks if the user wants to save changes when text is typed). If you do not want to terminate one of the specified programs, remove the corresponding part "/im <browser name>.exe" from the above command.

If you wish, you can extend the command to include other software to be terminated according to the scheme /im <program name>.exe. Programs that are not listed continue to run despite the "RAM cleaning". If one of the browsers is not running in the example, that means no side effects. If you like, you can save such command lines in batch files and name them appropriately; For example, the scripts are well stored on the desktop. You can use it to specifically fire off a series of programs that are currently disruptive by double-clicking - one batch file would be conceivable for each software genre.

  1. Restart explorer.exe

Problem: Windows runs unstable and unreliable - this is purely subjective and can hardly be measured. The file manager (Explorer) loads slowly, and under Windows 8.1 the charms bar does not appear when you swivel the mouse pointer on the right edge of the screen. By the way, the bar no longer exists since Windows 10.

Solution: Restart the explorer.exe process. This is quicker than using the task manager (especially under Windows 7, which, unlike its successors, does not yet offer a restart option for this):

cmd /k taskkill /IM explorer.exe /F & start explorer.exe & exit

Explanation/Note: The command terminates explorer.exe and restarts it under a different process ID number (PID). The desktop icons disappear briefly when you restart Explorer, don't be alarmed.

  1. Empty clipboard

Problem: The Windows clipboard records paths of files and folders as well as text. A tool from Glary Utilities shows that the RAM is used - and how much. Although clipboard data is unlikely to reduce PC performance, you may want to get rid of legacy clipboard data to improve your privacy.

Solution: If you copy something else to the clipboard, Windows will overwrite the old data record. For example, you can delete sensitive passwords in RAM. To do this, press the Print-S-Delete key for a screenshot. However, you can't create the cache blankly - but you can almost do so using the Run dialog command:

cmd /c echo off | clip

Explanation/Note: The command saves time, especially because it saves you having to log out/log in of the user account or restart Windows.

  1. Restart Windows

Problem: Restarting explorer.exe does not help Windows to sufficiently increase speed or stability.

Solution: Restarting Windows clears up the RAM more effectively and completes any pending Windows update installations, possible via

shutdown -r -t 01

Explanation/Note: The number serves as a parameter and defines the number of seconds that Windows waits before rebooting. If desired, replace the parameter with another value.

  1. Start programs with more performance

Problem: When you start a program, it usually loads with the process priority Normal. It is allocated an amount of processor resources that keeps it in line with other programs. The applications receive equal computing power and work on up to all processor cores. However, important programs that are supposed to complete their task quickly do not run as quickly as possible due to this standard priority.

Solution: Start a program that requires high performance with a custom process priority. The following commands load the editor (notepad.exe) with high and real-time priority:

cmd /k start /high "crome" notepad & exit cmd /k start /realtime "crome" notepad & exit

Explanation/Note: Replace the notepad command part with a program path if you want to start another program - the editor only serves as an example here and certainly does not need a lot of resources. The real-time parameter for the highest priority, real-time, only works if you start the desired software as an administrator - or execute the command accordingly.

You put the first command in the Run dialog, the second in the Start menu 7/8.1 start menu/tile search field for the administrator start (equivalently in the Admin start for a current Windows 10 and for Windows 11 -enabled Run dialog) – and press Ctrl-Shift-Enter. If you were to issue the second command via the Run dialog and [Enter], Windows would downgrade the priority of the specified program to "High" - "only" the second highest priority.

  1. Remove junk data from Windows

Problem: Garbage data from Windows doesn't paralyze the PC, but it clogs the hard drive or SSD.

Solution: Disk Cleanup (cleanmgr.exe) removes unnecessary data - if you add a parameter to cleanmgr, even without asking:

cleanmgr /verylowdisk

The tool does npt clean up much using the /verylowdisk switch. It is better if you use

cleanmgr /lowdisk

about author