Windows: "Clean" The Computer Through The Command Line To Run In The CMD Console.

EanB...n5vb
10 Sept 2023
270

Originally Posted: Publish0x

While I was writing my previous article "⚠ ⚠ Hackers + Malware + Windows = Cryptocurrency Mining ⚠ ⚠", I thought about adding a command line at the end to run in the Windows CMD console (I don't know if anyone still uses it 😀😀😀) , to "clean" the computers with this operating system a little. I admit that I later forgot it, that's why today, in payment of that debt to myself (and of course to you), I decided to write this short article.


It happens that nowadays, computers store a large amount of data, such as files, programs, images and videos, which can cause storage space to run out and/or unwanted files accumulate, which can slow down the performance of the computer. The other big problem is the number of hidden files and files that Windows has where viruses, malware, harmful scripts, etc. are generally hosted.


It is true that to free up space on the computer, unhide files and repair the computer there are various tools and methods, but personally, I consider it more satisfying to do things by yourself because in one way or another it helps us to better understand the systems with those of us who work. The command line that I propose will perform the following operations:


✔ Close Windows Explorer (function: taskkill), so you will only see the console working.

✔ Free up space in operational memory.

✔ Remove the "hidden" attribute from all folders and files on your computer on all drives (this takes a while).

✔ Delete unnecessary folders and files (bak, autorun, shs, gid, chk, temp, tmp).

✔ Defragments all computer drives.

✔ When finished, open Windows Explorer


The steps: The first thing you should do is copy the code into any simple text editor (it can be done from Notepad itself), then save it with the name you want (Example: CleanPC.txt), change the file extension. txt that you created with .bat, CleanPC.bat would remain (the icon changes to a command prompt). Finally, right clic on the file, go to "Run as Administrator", press Enter and wait patiently (very patiently 😀) for the script to complete.


Note: If you want to interrupt the process before it finishes, close the command window, press Ctrl + Shift + Esc keys, the "Task Manager" will open, clic "File", clic "Run New Task", A window will open, type: explorer and accept or execute Enter.


taskkill /im explorer.exe /f
@color f9
@mode con cols=140 lines=25
@prompt $h
@title "Clean PC by CryptoEntrepreneurs"
@echo off
@set LBRAM=0
@set cont=0
@set fin=0
@echo MYSTRING = (80000000)>Memory.vbe
@start Memory.vbe
echo Releasing Working Memory
echo %sub% Percent Complete
set sub=0
:a
@cls
echo Releasing Memory operativa
echo %cont% Percent Complete
@set/a LBRAM="%LBRAM% + 1"
@set/a cont="%LBRAM% / 10"
@if "%LBRAM%"=="1000" goto :B
@goto a
:B
@if exist Memory.vbe del/f/q Memory.vbe
@set cont=0
@cls
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v "Hidden" /t REG_DWORD /d "0x0" /f
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v "HideFileExt" /t REG_DWORD /d "0x0" /f
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v "SuperHidden" /t REG_DWORD /d "0x1" /f
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v "ShowSuperHidden" /t REG_DWORD /d "0x0" /f
@cls
@for %%F in (C D E F G H I J K L M N O P Q R S T U V W X Y Z) do @if exist %%F:\ attrib -r -a -s -h %%F:\*.* /s /d
@cls
@for %%F in (C D E F G H I J K L M N O P Q R S T U V W X Y Z) do @if exist %%F:\ del %%F:\*.bak; autorun.*; *.shs; *.gid; *.chk; *.temp; *.tmp /f /s /q
@cls
@if exist "%UserProfile%\AppData\Local\Microsoft\Photo Acquisition" del "%UserProfile%\AppData\Local\Microsoft\Photo Acquisition\*" /f /s /q
@if exist "%TEMP%\*.*" del /f/s/q "%TEMP%\*.*"
@if exist "%UserProfile%\Recent" del "%UserProfile%\Recent\*" /f /s /q
@if exist "%SystemRoot%\TEMP" del "%SystemRoot%\TEMP\*" /f /s /q
@if exist "%SystemRoot%\Prefetch" del "%SystemRoot%\Prefetch\*" /f /s /q
@if exist "%SystemRoot%\system32\wbem\Logs\*.*" del "%SystemRoot%\system32\wbem\Logs\*.*" /f/s/q
@if exist "%SystemRoot%\Debug\UserMode\*.*" del "%SystemRoot%\Debug\UserMode\*.*" /f/s/q
@if exist "%UserProfile%\AppData\Roaming\Microsoft\PowerPoint" del "%UserProfile%\AppData\Roaming\Microsoft\PowerPoint\*" /f /s /q
@if exist "%UserProfile%\AppData\Roaming\Microsoft\Windows\Recent" del "%UserProfile%\AppData\Roaming\Microsoft\Windows\Recent\*" /f /s /q
@if exist "%UserProfile%\AppData\Local\Temp" del "%UserProfile%\AppData\Local\Temp\*" /f /s /q
@if exist "%UserProfile%\Datos de programa\Microsoft\Office\Reciente" del "%UserProfile%\Datos de programa\Microsoft\Office\Reciente\*" /f /s /q
@if exist "%UserProfile%\Config~1\Temp" del "%UserProfile%\Config~1\Temp\*" /f /s /q
@if exist "%UserProfile%\Config~1\Archivos temporales de Internet" del "%UserProfile%\Config~1\Archivos temporales de Internet\*" /f /s /q
@if exist "%UserProfile%\AppData\Local\Microsoft\Windows\Explorer" del "%UserProfile%\AppData\Local\Microsoft\Windows\Explorer\*.*" /f /s /q
@for %%F in (C D E F G H I J K L M N O P Q R S T U V W X Y Z) do @if exist %%F:\$RECYCLE.BIN del %%F:\$RECYCLE.BIN\* /f /s /q
@cls
@if exist "%UserProfile%\Recent" rd "%UserProfile%\Recent" /s /q
@if exist "%SystemRoot%\TEMP" rd "%SystemRoot%\TEMP" /s /q
@if exist "%UserProfile%\AppData\Roaming\Microsoft\PowerPoint" rd "%UserProfile%\AppData\Roaming\Microsoft\PowerPoint" /s /q
@if exist "%UserProfile%\AppData\Roaming\Microsoft\Windows\Recent" rd "%UserProfile%\AppData\Roaming\Microsoft\Windows\Recent" /s /q
@if exist "%UserProfile%\AppData\Local\Temp" rd "%UserProfile%\AppData\Local\Temp" /s /q
@if exist "%UserProfile%\Datos de programa\Microsoft\Office\Reciente" rd "%UserProfile%\Datos de programa\Microsoft\Office\Reciente" /s /q
@if exist "%UserProfile%\Config~1\Temp" rd "%UserProfile%\Config~1\Temp" /s /q
@if exist "%UserProfile%\Config~1\Archivos temporales de Internet" rd "%UserProfile%\Config~1\Archivos temporales de Internet" /s /q
@if exist "%UserProfile%\Entorno de red" rd "%UserProfile%\Entorno de red" /s /q
@for %%F in (C D E F G H I J K L M N O P Q R S T U V W X Y Z) do @if exist %%F:\$RECYCLE.BIN rd %%F:\$RECYCLE.BIN /s /q
@cls
DEFRAG /C /H /U /V /X
start explorer.exe
exit


I hope you find it useful. I would appreciate it if you could "give me" your ideas on the subject, modifications, improvements and/or links to your articles.


"To invest you don't have to be a millionaire, but to become a millionaire, you have to invest". - Anonymous.


TOOLS, PLATFORMS & APPLICATIONS

Earn active and passive earnings (using referral programs). However, I recommend that you do your own research.


💲 QuantFury (JRRU2593) - Trading - Join using my invite code: JRRU2593 and we will both receive a free share like AAPL or UBER, or crypto like BTC or ETH (up to $250). Trade and invest with no commissions or borrowing fees at real-time spot prices from the NYSE, Nasdaq, CME, Bats, Binance and Coinbase exchanges. With a good marketing management you have the possibility of obtaining passive profits without operating in the market.

💲 StormGain - Trading - They can start without investment, capital is acquired for free with the Bitcoin Cloud Miner

💲 BingX - Trading - Called "The People's Exchange", it places a strong emphasis on social trading and offers its clients extensive features: new user rewards, demo account, high leverage, spot trading, standard and perpetual futures, grid trading, copy feed , etc.

💲 BulbPublish0x - Earn daily Crypto, NTFs or Money for reading or writing articles and interacting with publications.

💲 AddmeFast - Earn daily Crypto. Promote and increase the sources of traffic, visibility, reach and reputation of your social networks.

💲 Bitrefill - Living with crypto, a philosophy of financial freedom. Travel, play, eat and live with BTC.

🎁 Undress AI - It's obvious, right?

🎁 GamesHoroscope, Dating, Sweepstakes, Health, Video, DownloadOthersSpecial - mVAS (+18).


💖Donate To The Author💖

Get fast shipping, movies & more with Amazon Prime

Start free trial

Enjoy this blog? Subscribe to CryptoEntrepreneurs

17 Comments