Skip to content

Rlucca224/WinTempCleaner

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🧹 WinTempCleaner

One-click desktop shortcut to silently delete all temporary files on Windows 11 — no windows, no flashing, just a clean notification when it's done.

Windows 11 PowerShell License


✨ What it does

Adds a "Delete Temporary Files" option to your Windows 11 desktop right-click context menu. One click silently cleans all temp folders in the background with admin privileges — no CMD window, no blue PowerShell flash — just a toast notification when finished.

Inspired by the same feature found in Windows Ghost Spectre.


🚀 Install

Open PowerShell and run:

irm https://raw.githubusercontent.com/Rlucca224/WinTempCleaner/main/install.ps1 | iex

That's it. If PowerShell is not running as Administrator, it will automatically relaunch elevated. Right-click your desktop and the option is there.

⚠️ Windows UAC will prompt for confirmation when you use the option. This is expected and cannot be bypassed — it's a Windows security feature required to delete system temp files.


❌ Uninstall

Open PowerShell and run:

irm https://raw.githubusercontent.com/Rlucca224/WinTempCleaner/main/uninstall.ps1 | iex

This removes the registry key and all files. Your system will be left exactly as it was before installation.


🧽 What gets cleaned

Folder Description
%TEMP% / %TMP% Standard temp environment paths
%LOCALAPPDATA%\Temp User local temp files
%LOCALAPPDATA%\Microsoft\Windows\INetCache Edge / IE legacy cache
%LOCALAPPDATA%\Microsoft\Windows\Temporary Internet Files Temporary internet files
%LOCALAPPDATA%\CrashDumps Application crash dumps
C:\Windows\Temp System-wide temp folder
C:\Windows\Logs\CBS Component Based Servicing logs
C:\Windows\Minidump Blue screen memory dumps
C:\Windows\SoftwareDistribution\Download Already-installed Windows Update files

Note: C:\Windows\Prefetch is intentionally excluded to avoid game shader recompilation on next launch.

After cleanup, a toast notification shows how many items were removed and how many MB were freed.


🔧 How it works

Right-click Desktop -> "Delete Temporary Files"
         |
   wscript.exe  (invisible, runs in background)
         |
   Launcher.vbs  (launches PowerShell with WindowStyle = 0)
         |
   UAC prompt  (Windows elevation confirmation)
         |
   DeleteTemp.ps1  (cleans all temp folders silently)
         |
   Toast notification  (done)

🗂️ Repository files

File Description
install.ps1 Downloads everything and sets up the context menu entry
uninstall.ps1 Completely removes everything the installer added
DeleteTemp.ps1 PowerShell script that performs the actual cleanup
Launcher.vbs Silent VBScript launcher — prevents any visible window from appearing

📋 Requirements

  • Windows 11 (also works on Windows 10)
  • PowerShell 5.1 or later (included in Windows by default)
  • Administrator rights for installation

📄 License

MIT — free to use, modify, and distribute.

About

Quickly delete all temporary files from the Windows 11 desktop context menu

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors