Solved Clear all edge cache files with CMD


Sheikh

Well-known member
Member
Local time
8:55 PM
Posts
259
Location
Tehran, IRAN.
OS
Windows 11 Pro 24H2
Hi
I want to manually clear
1- Browsing History
2- Download History
3- Cookies and other site data
4- Cached images and files
5- Passwords
6- Autofill from data
7- Site permissions
8- Media foundation data
with CMD commands in a .bat file.

just found this : Simple script to clear temp files and browser cache/history
it has some bugs yet and it needs powershell, I want to re-write it in a .bat file to use cmd, so I don't have to re-open the edge, select everything and hit the clean button. just a bat file and boom it's fresh again.
can you help me which directories should I delete manually? I have only edge-chromium on my desktop and I don't want to destroy my browser, it's linked to my microsoft account and I don't want to sign in to my MS account every time, only the cached files as is in the edge settings.

thanks.
 

My Computers

System One System Two

  • OS
    Windows 11 Pro 24H2
    Computer type
    Laptop
    Manufacturer/Model
    Huawei MateBook D15
    CPU
    Ryzen 5 3500U
    Memory
    8GB
    Graphics Card(s)
    Vega 8
    Screen Resolution
    FHD
    Hard Drives
    256GB Samsung SSD + 1TB HDD
    Browser
    Microsoft Edge
    Antivirus
    ESET Smart Security Premium
  • Operating System
    Windows 10 Enterprise LTSC 21H2
    Computer type
    Laptop
    Manufacturer/Model
    MSI GS73 6RF Stealth Pro
    CPU
    intel core i7 6700HQ
    Memory
    16GB
    Graphics card(s)
    Nvidia Geforce GTX1060 (6GB)
    Screen Resolution
    FHD
    Hard Drives
    128GB SSD + 1TB HDD
    Browser
    Microsoft Edge
    Antivirus
    Windows Defender
WHY (?) should you delete all your passwords and sitepermissions.............? :unsure:
 

My Computer

System One

  • OS
    Windows11 Pro
    Computer type
    PC/Desktop
    Manufacturer/Model
    Asus
    CPU
    i7
    Motherboard
    z97k
    Memory
    32GB
    Graphics Card(s)
    nVidia
    Sound Card
    Realtek
    Hard Drives
    3
    Cooling
    air

My Computers

System One System Two

  • OS
    Windows 11 Pro 24H2
    Computer type
    Laptop
    Manufacturer/Model
    Huawei MateBook D15
    CPU
    Ryzen 5 3500U
    Memory
    8GB
    Graphics Card(s)
    Vega 8
    Screen Resolution
    FHD
    Hard Drives
    256GB Samsung SSD + 1TB HDD
    Browser
    Microsoft Edge
    Antivirus
    ESET Smart Security Premium
  • Operating System
    Windows 10 Enterprise LTSC 21H2
    Computer type
    Laptop
    Manufacturer/Model
    MSI GS73 6RF Stealth Pro
    CPU
    intel core i7 6700HQ
    Memory
    16GB
    Graphics card(s)
    Nvidia Geforce GTX1060 (6GB)
    Screen Resolution
    FHD
    Hard Drives
    128GB SSD + 1TB HDD
    Browser
    Microsoft Edge
    Antivirus
    Windows Defender
developing a script like what CCleaner does.

Why not just use CCleaner?

Google will give you a batch command if you ask it correctly, CoPilot will do even better.
All these questions you’ve been asking in forum, I predict we’ll see even more soon, like “Why is my PC broken?”
 

My Computers

System One System Two

  • OS
    Windows 11 Pro 23H2 Build 22631.5472
    Computer type
    PC/Desktop
    Manufacturer/Model
    Sin-built
    CPU
    Intel(R) Core(TM) i7-4770K CPU @ 3.50GHz (4th Gen?)
    Motherboard
    ASUS ROG Maximus VI Formula
    Memory
    32.0 GB of I forget and the box is in storage.
    Graphics Card(s)
    Gigabyte nVidia GeForce GTX 1660 Super OC 6GB
    Sound Card
    Onboard
    Monitor(s) Displays
    5 x LG 25MS500-B - 1 x 24MK430H-B - 1 x Wacom Pro 22" Tablet
    Screen Resolution
    All over the place
    Hard Drives
    Too many to list.
    OS on Samsung 1TB 870 QVO SATA
    PSU
    Silverstone 1500
    Case
    NZXT Phantom 820 Full-Tower Case
    Cooling
    Noctua NH-D15 Elite Class Dual Tower CPU Cooler / 6 x EziDIY 120mm / 2 x Corsair 140mm somethings / 1 x 140mm Thermaltake something / 2 x 200mm Corsair.
    Keyboard
    Corsair K95 / Logitech diNovo Edge Wireless
    Mouse
    Logitech: G402 / G502 / Mx Masters / MX Air Cordless
    Internet Speed
    1000/400Mbps
    Browser
    All sorts
    Antivirus
    Kaspersky Premium
    Other Info
    I’m on a horse.
  • Operating System
    Windows 11 Pro 23H2 Build: 22631.4249
    Computer type
    Laptop
    Manufacturer/Model
    LENOVO Yoga 7i EVO OLED 14" Touchscreen i5 12 Core 16GB/512GB
    CPU
    Intel Core 12th Gen i5-1240P Processor (1.7 - 4.4GHz)
    Memory
    16GB LPDDR5 RAM
    Graphics card(s)
    Intel Iris Xe Graphics Processor
    Sound Card
    Optimized with Dolby Atmos®
    Screen Resolution
    QHD 2880 x 1800 OLED
    Hard Drives
    M.2 512GB
    Antivirus
    Defender / Malwarebytes
    Other Info
    …still on a horse.
I totally agree with @antspants. Scripting can get you into trouble real quick. Just ask one of the guys here that are experienced in it.

Unless you are a trained IT person, you are much safer using one of the many available free tools designed for the job at hand. Always use 3rd party tools with a respected reputation and don't willy-nilly download scripts from unknown sources or individuals.
 

My Computers

System One System Two

  • OS
    Windows 11 Pro 24H2 26100.4061
    Computer type
    PC/Desktop
    Manufacturer/Model
    Dell Optiplex 7080
    CPU
    i9-10900 10 core 20 threads
    Motherboard
    DELL 0J37VM
    Memory
    32 gb
    Graphics Card(s)
    none-Intel UHD Graphics 630
    Sound Card
    Integrated Realtek
    Monitor(s) Displays
    Benq 27
    Screen Resolution
    2560x1440
    Hard Drives
    1tb Solidigm m.2 nvme+256gb SKHynix m.2 nvme /External drives 512gb Samsung m.2 sata+1tb Kingston m2.nvme+ 4gb Solidigm nvme
    PSU
    500w
    Case
    MT
    Cooling
    Dell Premium
    Keyboard
    Logitech wired
    Mouse
    Logitech wireless
    Internet Speed
    so slow I'm too embarrassed to tell
    Browser
    #1 Edge #2 Firefox
    Antivirus
    Defender+MWB Premium
  • Operating System
    Windows 11 Pro 24H2 26100.4061
    Computer type
    PC/Desktop
    Manufacturer/Model
    Beelink Mini PC SER5
    CPU
    AMD Ryzen 7 6800U
    Memory
    32 gb
    Graphics card(s)
    integrated
    Sound Card
    integrated
    Monitor(s) Displays
    Benq 27
    Screen Resolution
    2560x1440
    Hard Drives
    1TB Crucial nvme
    Mouse
    Logitech wireless
    Keyboard
    Logitech wired
    Internet Speed
    still too embarrassed to tell
    Browser
    Firefox
    Antivirus
    Defender
    Other Info
    System 3 is non compliant Dell 9020 i7-4770/24gb ram Win11 PRO 26100.4061
[Microsoft Edge Bookmark Backup *]
LangSecRef = 3006
DetectFile = %LocalAppData%\Microsoft\Edge*
FileKey1 = %LocalAppData%\Microsoft\Edge*\User Data\*|*Bookmarks.bak

[Microsoft Edge Bookmark Favicons *]
LangSecRef = 3006
DetectFile = %LocalAppData%\Microsoft\Edge*
FileKey1 = %LocalAppData%\Microsoft\Edge*\User Data\*|favicons*

[Microsoft Edge Caches *]
LangSecRef = 3006
DetectFile = %LocalAppData%\Microsoft\Edge*
FileKey1 = %LocalAppData%\Microsoft\Edge*\User Data\*|*.ldb;*.log;CURRENT;LOCK;MANIFEST-*;load_statistics.db*
FileKey2 = %LocalAppData%\Microsoft\Edge*\User Data\*|*-journal|RECURSE
FileKey3 = %LocalAppData%\Microsoft\Edge*\User Data\*\*Cache*|*|REMOVESELF
FileKey4 = %LocalAppData%\Microsoft\Edge*\User Data\*\blob_storage|*|REMOVESELF
FileKey5 = %LocalAppData%\Microsoft\Edge*\User Data\*\BudgetDatabase|*|REMOVESELF
FileKey6 = %LocalAppData%\Microsoft\Edge*\User Data\*\data_reduction_proxy_leveldb|*|REMOVESELF
FileKey7 = %LocalAppData%\Microsoft\Edge*\User Data\*\EdgeCoupons\coupons_data.db|*
FileKey8 = %LocalAppData%\Microsoft\Edge*\User Data\*\GCM Store|*|REMOVESELF
FileKey9 = %LocalAppData%\Microsoft\Edge*\User Data\*\JumpListIcons*|*|REMOVESELF
FileKey10 = %LocalAppData%\Microsoft\Edge*\User Data\*\optimization_guide*|*|REMOVESELF
FileKey11 = %LocalAppData%\Microsoft\Edge*\User Data\*\Pdf|pdfSQLite
FileKey12 = %LocalAppData%\Microsoft\Edge*\User Data\*\Platform Notifications|*|REMOVESELF
FileKey13 = %LocalAppData%\Microsoft\Edge*\User Data\*\Service Worker\*|*|REMOVESELF
FileKey14 = %LocalAppData%\Microsoft\Edge*\User Data\*\Storage\ext\*\def\Platform Notifications|*|REMOVESELF
FileKey15 = %LocalAppData%\Microsoft\Edge*\User Data\*\Web Applications|*|REMOVESELF
FileKey16 = %LocalAppData%\Microsoft\Edge*\User Data\*Cache*|*|REMOVESELF
FileKey17 = %ProgramFiles%\Microsoft\Edge*\Temp|*|REMOVESELF
FileKey18 = %ProgramFiles%\Microsoft\Temp|*|REMOVESELF

[Microsoft Edge Cookies *]
LangSecRef = 3006
DetectFile = %LocalAppData%\Microsoft\Edge*
FileKey1 = %LocalAppData%\Microsoft\Edge*\User Data\*|Login Data
FileKey2 = %LocalAppData%\Microsoft\Edge*\User Data\*\IndexedDB\https*|*
FileKey3 = %LocalAppData%\Microsoft\Edge*\User Data\*\Network|Cookies

[Microsoft Edge History *]
LangSecRef = 3006
DetectFile = %LocalAppData%\Microsoft\Edge*
FileKey1 = %LocalAppData%\Microsoft\Edge*\User Data\*|History*;Visited Links*;Top Sites*;Network Action Predictor*;Shortcuts

[Microsoft Edge Logs *]
LangSecRef = 3006
DetectFile = %LocalAppData%\Microsoft\Edge*
FileKey1 = %LocalAppData%\Microsoft\Edge*\Application|debug.log
FileKey2 = %LocalAppData%\Microsoft\Edge*\User Data\*|LOG;LOG.old|RECURSE
FileKey3 = %LocalLowAppData%\Microsoft\EdgeBho|*.log
FileKey4 = %ProgramFiles%\Microsoft\Edge*\Application|debug.log
FileKey5 = %WinDir%\System32\config\systemprofile\AppData\Local\Microsoft\Edge\*\*|LOG;LOG.old|RECURSE

[Microsoft Edge Session *]
LangSecRef = 3006
DetectFile = %LocalAppData%\Microsoft\Edge*
FileKey1 = %LocalAppData%\Microsoft\Edge*\User Data\*\Extension State|*
FileKey2 = %LocalAppData%\Microsoft\Edge*\User Data\*\session*|*

[Microsoft Edge Sync Data *]
LangSecRef = 3006
DetectFile = %LocalAppData%\Microsoft\Edge*
FileKey1 = %LocalAppData%\Microsoft\Edge*\User Data\*\Sync Data|*|REMOVESELF

[Microsoft Edge Telemetry *]
LangSecRef = 3006
DetectFile = %LocalAppData%\Microsoft\Edge*
FileKey1 = %LocalAppData%\Microsoft\CrashReports|*
FileKey2 = %LocalAppData%\Microsoft\Edge*\Application\SetupMetrics|*|REMOVESELF
FileKey3 = %LocalAppData%\Microsoft\Edge*\User Data\*|DashTrackerDatabase;load_statistics*;WebAssistDatabase*
FileKey4 = %LocalAppData%\Microsoft\Edge*\User Data\*\Feature Engagement Tracker|*|REMOVESELF
FileKey5 = %LocalAppData%\Microsoft\Edge*\User Data\*\Network|Media History;Network*;Reporting*;Transport*
FileKey6 = %LocalAppData%\Microsoft\Edge*\User Data\*\Site Characteristics Database|*|REMOVESELF
FileKey7 = %LocalAppData%\Microsoft\Edge*\User Data\*\Storage\ext\*\def|Network Persistent State
FileKey8 = %LocalAppData%\Microsoft\Edge*\User Data\*\VideoDecodeStats|*|REMOVESELF
FileKey9 = %LocalAppData%\Microsoft\Edge*\User Data\BrowserMetrics|*|REMOVESELF
FileKey10 = %LocalAppData%\Microsoft\Edge*\User Data\Crashpad|metadata
FileKey11 = %LocalAppData%\Microsoft\Edge*\User Data\Crashpad\reports|*
FileKey12 = %LocalAppData%\Microsoft\Edge*\User Data\Stability|*|REMOVESELF
FileKey13 = %ProgramFiles%\Microsoft\CrashReports|*
FileKey14 = %ProgramFiles%\Microsoft\Edge*\Application\SetupMetrics|*|REMOVESELF

[Microsoft Edge Updates *]
LangSecRef = 3006
DetectFile = %LocalAppData%\Microsoft\Edge*
FileKey1 = %CommonAppData%\Microsoft\EdgeUpdate\Log|*
FileKey2 = %LocalAppData%\Microsoft\EdgeUpdate\Download|*|RECURSE
FileKey3 = %LocalAppData%\Microsoft\EdgeUpdate\Install|*|RECURSE
FileKey4 = %LocalAppData%\Microsoft\EdgeUpdate\Offline|*|RECURSE
FileKey5 = %ProgramFiles%\Microsoft\EdgeUpdate\Download|*|RECURSE
FileKey6 = %ProgramFiles%\Microsoft\EdgeUpdate\Install|*|RECURSE
FileKey7 = %ProgramFiles%\Microsoft\EdgeUpdate\Offline|*|RECURSE
 

My Computer

System One

  • OS
    Microsoft Windows 11 Home
    Computer type
    PC/Desktop
    Manufacturer/Model
    MSI MS-7D98
    CPU
    Intel Core i5-13490F
    Motherboard
    MSI B760 GAMING PLUS WIFI
    Memory
    2 x 16 Patriot Memory (PDP Systems) PSD516G560081
    Graphics Card(s)
    GIGABYTE GeForce RTX 4070 WINDFORCE OC 12G (GV-N4070WF3OC-12GD)
    Sound Card
    Bluetooth Аудио
    Monitor(s) Displays
    INNOCN 15K1F
    Screen Resolution
    1920 x 1080
    Hard Drives
    WD_BLACK SN770 250GB
    KINGSTON SNV2S1000G (ELFK0S.6)
    PSU
    Thermaltake Toughpower GF3 1000W
    Case
    CG560 - DeepCool
    Cooling
    ID-COOLING SE-224-XTS / 2 x 140Mm Fan - rear and top; 3 x 120Mm - front
    Keyboard
    Corsair K70 RGB TKL
    Mouse
    Corsair KATAR PRO XT
    Internet Speed
    100 Mbps
    Browser
    Firefox
    Antivirus
    Microsoft Defender Antivirus
    Other Info
    https://www.userbenchmark.com/UserRun/66553205
Why not just use CCleaner?

Google will give you a batch command if you ask it correctly, CoPilot will do even better.
All these questions you’ve been asking in forum, I predict we’ll see even more soon, like “Why is my PC broken?”
I’m just trying to create my first application with system privileges to learn how to code and create scripts which modify system settings. But first of all I need to understand everything and make sure nothing’s gonna break the OS.
If we think that running a simple script breaks our pc, we never try to learn. It’s not a professional opinion that we say we have CCleaner so why we need to create a new one? The WiseCleaner or RevoUninstaller developers know the answer! Because it’s not enough to just click on some buttons without understanding what’s happening in the background.
And about the last sentence, It doesn’t matter I’m testing it on my virtual machine.
 

My Computers

System One System Two

  • OS
    Windows 11 Pro 24H2
    Computer type
    Laptop
    Manufacturer/Model
    Huawei MateBook D15
    CPU
    Ryzen 5 3500U
    Memory
    8GB
    Graphics Card(s)
    Vega 8
    Screen Resolution
    FHD
    Hard Drives
    256GB Samsung SSD + 1TB HDD
    Browser
    Microsoft Edge
    Antivirus
    ESET Smart Security Premium
  • Operating System
    Windows 10 Enterprise LTSC 21H2
    Computer type
    Laptop
    Manufacturer/Model
    MSI GS73 6RF Stealth Pro
    CPU
    intel core i7 6700HQ
    Memory
    16GB
    Graphics card(s)
    Nvidia Geforce GTX1060 (6GB)
    Screen Resolution
    FHD
    Hard Drives
    128GB SSD + 1TB HDD
    Browser
    Microsoft Edge
    Antivirus
    Windows Defender
Understood. Learning is great.
 

My Computers

System One System Two

  • OS
    Windows 11 Pro 23H2 Build 22631.5472
    Computer type
    PC/Desktop
    Manufacturer/Model
    Sin-built
    CPU
    Intel(R) Core(TM) i7-4770K CPU @ 3.50GHz (4th Gen?)
    Motherboard
    ASUS ROG Maximus VI Formula
    Memory
    32.0 GB of I forget and the box is in storage.
    Graphics Card(s)
    Gigabyte nVidia GeForce GTX 1660 Super OC 6GB
    Sound Card
    Onboard
    Monitor(s) Displays
    5 x LG 25MS500-B - 1 x 24MK430H-B - 1 x Wacom Pro 22" Tablet
    Screen Resolution
    All over the place
    Hard Drives
    Too many to list.
    OS on Samsung 1TB 870 QVO SATA
    PSU
    Silverstone 1500
    Case
    NZXT Phantom 820 Full-Tower Case
    Cooling
    Noctua NH-D15 Elite Class Dual Tower CPU Cooler / 6 x EziDIY 120mm / 2 x Corsair 140mm somethings / 1 x 140mm Thermaltake something / 2 x 200mm Corsair.
    Keyboard
    Corsair K95 / Logitech diNovo Edge Wireless
    Mouse
    Logitech: G402 / G502 / Mx Masters / MX Air Cordless
    Internet Speed
    1000/400Mbps
    Browser
    All sorts
    Antivirus
    Kaspersky Premium
    Other Info
    I’m on a horse.
  • Operating System
    Windows 11 Pro 23H2 Build: 22631.4249
    Computer type
    Laptop
    Manufacturer/Model
    LENOVO Yoga 7i EVO OLED 14" Touchscreen i5 12 Core 16GB/512GB
    CPU
    Intel Core 12th Gen i5-1240P Processor (1.7 - 4.4GHz)
    Memory
    16GB LPDDR5 RAM
    Graphics card(s)
    Intel Iris Xe Graphics Processor
    Sound Card
    Optimized with Dolby Atmos®
    Screen Resolution
    QHD 2880 x 1800 OLED
    Hard Drives
    M.2 512GB
    Antivirus
    Defender / Malwarebytes
    Other Info
    …still on a horse.
Understood. Learning is great.
And it can be painful as well! :p :p When I was a novice EE, I cooked quite a few components learning various lessons! :lmao: I've also bricked several computers and even a cell phone while "learning" about things I probably shouldn't have been doing anyway! :unsure:
 

My Computers

System One System Two

  • OS
    Windows 11 Pro 24H2, Build 26100.4351, Experience Pack 1000.26100.107.0
    Computer type
    PC/Desktop
    Manufacturer/Model
    Home Brew
    CPU
    Intel Core i5 14500
    Motherboard
    Gigabyte B760M G P WIFI
    Memory
    64GB DDR4
    Graphics Card(s)
    GeForce RTX 4060
    Sound Card
    Chipset Realtek
    Monitor(s) Displays
    LG 45" Ultragear, Acer 24" 1080p
    Screen Resolution
    5120x1440, 1920x1080
    Hard Drives
    Crucial P310 2TB 2280 PCIe Gen4 3D NAND NVMe M.2 SSD (O/S)
    Silicon Power 2TB US75 Nvme PCIe Gen4 M.2 2280 SSD (backup)
    Crucial BX500 2TB 3D NAND (2nd backup)
    External off-line backup Drives: 2 NVMe 4TB drives in external enclosures
    PSU
    Thermaltake Toughpower GF3 750W
    Case
    LIAN LI LANCOOL 216 E-ATX PC Case
    Cooling
    Lots of fans!
    Keyboard
    Microsoft Comfort Curve 2000
    Mouse
    Logitech G305
    Internet Speed
    Verizon FiOS 1GB
    Browser
    Firefox
    Antivirus
    Malware Bytes & Windows Security
  • Operating System
    Windows 11 Pro 24H2, Build 26100.4351 Experience Pack 1000.26100.107.0
    Computer type
    PC/Desktop
    Manufacturer/Model
    Home Brew
    CPU
    Intel Core i5 14400
    Motherboard
    Gigabyte B760M DS3H AX
    Memory
    32GB DDR5
    Graphics card(s)
    Intel 700 Embedded GPU
    Sound Card
    Realtek Embedded
    Monitor(s) Displays
    27" HP 1080p
    Screen Resolution
    1920x1080
    Hard Drives
    Crucial P310 2TB 2280 PCIe Gen4 eD NAND PCIe SSD
    Samsung EVO 990 2TB NVMe Gen4 SSD
    Samsung 2TB SATA SSD
    PSU
    Thermaltake Smart BM3 650W
    Case
    Okinos Micro ATX Case
    Cooling
    Fans
    Mouse
    Logitech G305
    Keyboard
    Microsoft Comfort Curve 2000
    Internet Speed
    Verizon FiOS 1GB
    Browser
    Firefox
    Antivirus
    Malware Bytes & Windows Security
Maybe it was better to add my new question to the first post…
How can I change the edge cache/cookies/… directory to another drive?
Checked reddit, superuser and etc. but couldn’t find a direct answer. Only microsoft documentation says that it’s available through group policy but I can’t find DiskCacheDir. Do I have to use this method ?
Looking for a safer method instead of changing registry keys :(
 

My Computers

System One System Two

  • OS
    Windows 11 Pro 24H2
    Computer type
    Laptop
    Manufacturer/Model
    Huawei MateBook D15
    CPU
    Ryzen 5 3500U
    Memory
    8GB
    Graphics Card(s)
    Vega 8
    Screen Resolution
    FHD
    Hard Drives
    256GB Samsung SSD + 1TB HDD
    Browser
    Microsoft Edge
    Antivirus
    ESET Smart Security Premium
  • Operating System
    Windows 10 Enterprise LTSC 21H2
    Computer type
    Laptop
    Manufacturer/Model
    MSI GS73 6RF Stealth Pro
    CPU
    intel core i7 6700HQ
    Memory
    16GB
    Graphics card(s)
    Nvidia Geforce GTX1060 (6GB)
    Screen Resolution
    FHD
    Hard Drives
    128GB SSD + 1TB HDD
    Browser
    Microsoft Edge
    Antivirus
    Windows Defender
Maybe it was better to add my new question to the first post…
How can I change the edge cache/cookies/… directory to another drive?
Checked reddit, superuser and etc. but couldn’t find a direct answer. Only microsoft documentation says that it’s available through group policy but I can’t find DiskCacheDir. Do I have to use this method ?
Looking for a safer method instead of changing registry keys :(
Well, your scripts are going to end up changing the registry keys. So, you can just write a simple registry file that does it directly. What do you gain by doing a complicated script?
 

My Computers

System One System Two

  • OS
    Windows 11 Pro 24H2, Build 26100.4351, Experience Pack 1000.26100.107.0
    Computer type
    PC/Desktop
    Manufacturer/Model
    Home Brew
    CPU
    Intel Core i5 14500
    Motherboard
    Gigabyte B760M G P WIFI
    Memory
    64GB DDR4
    Graphics Card(s)
    GeForce RTX 4060
    Sound Card
    Chipset Realtek
    Monitor(s) Displays
    LG 45" Ultragear, Acer 24" 1080p
    Screen Resolution
    5120x1440, 1920x1080
    Hard Drives
    Crucial P310 2TB 2280 PCIe Gen4 3D NAND NVMe M.2 SSD (O/S)
    Silicon Power 2TB US75 Nvme PCIe Gen4 M.2 2280 SSD (backup)
    Crucial BX500 2TB 3D NAND (2nd backup)
    External off-line backup Drives: 2 NVMe 4TB drives in external enclosures
    PSU
    Thermaltake Toughpower GF3 750W
    Case
    LIAN LI LANCOOL 216 E-ATX PC Case
    Cooling
    Lots of fans!
    Keyboard
    Microsoft Comfort Curve 2000
    Mouse
    Logitech G305
    Internet Speed
    Verizon FiOS 1GB
    Browser
    Firefox
    Antivirus
    Malware Bytes & Windows Security
  • Operating System
    Windows 11 Pro 24H2, Build 26100.4351 Experience Pack 1000.26100.107.0
    Computer type
    PC/Desktop
    Manufacturer/Model
    Home Brew
    CPU
    Intel Core i5 14400
    Motherboard
    Gigabyte B760M DS3H AX
    Memory
    32GB DDR5
    Graphics card(s)
    Intel 700 Embedded GPU
    Sound Card
    Realtek Embedded
    Monitor(s) Displays
    27" HP 1080p
    Screen Resolution
    1920x1080
    Hard Drives
    Crucial P310 2TB 2280 PCIe Gen4 eD NAND PCIe SSD
    Samsung EVO 990 2TB NVMe Gen4 SSD
    Samsung 2TB SATA SSD
    PSU
    Thermaltake Smart BM3 650W
    Case
    Okinos Micro ATX Case
    Cooling
    Fans
    Mouse
    Logitech G305
    Keyboard
    Microsoft Comfort Curve 2000
    Internet Speed
    Verizon FiOS 1GB
    Browser
    Firefox
    Antivirus
    Malware Bytes & Windows Security
Understood. Learning is great.
Absolutely, but why re-invent the wheel when it's already been done by multiple cleaning options - Wise Disk Cleaner, Glary Utilities, et al

The persistence of the OP with the scripting option has a hint of assignment/homework about it ..... :unsure:
 

My Computers

System One System Two

  • OS
    Windows 11 2xH2 (latest update ... forever anal)
    Computer type
    PC/Desktop
    Manufacturer/Model
    HP Slim S01
    CPU
    Intel i5-12400
    Memory
    8GB
    Graphics Card(s)
    NVIDIA GeForce GT730
    Sound Card
    OOBE
    Monitor(s) Displays
    Acer 32"
    Screen Resolution
    1920x1080
    Hard Drives
    512GB KIOXIA NVMe
    1TB SATA SSD
    PSU
    OOBE
    Case
    OOBE
    Cooling
    OOBE
    Keyboard
    BT
    Mouse
    BT
    Browser
    Brave FFox Chrome Opera
    Antivirus
    KIS
  • Operating System
    Windows 11 Pro 2xH2 (latest update ... 4ever anal)
    Computer type
    Laptop
    Manufacturer/Model
    HP Pavillion 15
    CPU
    i7-1165G7 @ 2.80GHz
    Graphics card(s)
    Intel Iris Xe Graphics
    Hard Drives
    Samsung NVMe 512GB
    + numerous/multiple SSD Type C USB enclosures
    Internet Speed
    NBN FTTN 50
    Browser
    Brave
    Antivirus
    KIS

My Computers

System One System Two

  • OS
    Windows 11 Pro 23H2 Build 22631.5472
    Computer type
    PC/Desktop
    Manufacturer/Model
    Sin-built
    CPU
    Intel(R) Core(TM) i7-4770K CPU @ 3.50GHz (4th Gen?)
    Motherboard
    ASUS ROG Maximus VI Formula
    Memory
    32.0 GB of I forget and the box is in storage.
    Graphics Card(s)
    Gigabyte nVidia GeForce GTX 1660 Super OC 6GB
    Sound Card
    Onboard
    Monitor(s) Displays
    5 x LG 25MS500-B - 1 x 24MK430H-B - 1 x Wacom Pro 22" Tablet
    Screen Resolution
    All over the place
    Hard Drives
    Too many to list.
    OS on Samsung 1TB 870 QVO SATA
    PSU
    Silverstone 1500
    Case
    NZXT Phantom 820 Full-Tower Case
    Cooling
    Noctua NH-D15 Elite Class Dual Tower CPU Cooler / 6 x EziDIY 120mm / 2 x Corsair 140mm somethings / 1 x 140mm Thermaltake something / 2 x 200mm Corsair.
    Keyboard
    Corsair K95 / Logitech diNovo Edge Wireless
    Mouse
    Logitech: G402 / G502 / Mx Masters / MX Air Cordless
    Internet Speed
    1000/400Mbps
    Browser
    All sorts
    Antivirus
    Kaspersky Premium
    Other Info
    I’m on a horse.
  • Operating System
    Windows 11 Pro 23H2 Build: 22631.4249
    Computer type
    Laptop
    Manufacturer/Model
    LENOVO Yoga 7i EVO OLED 14" Touchscreen i5 12 Core 16GB/512GB
    CPU
    Intel Core 12th Gen i5-1240P Processor (1.7 - 4.4GHz)
    Memory
    16GB LPDDR5 RAM
    Graphics card(s)
    Intel Iris Xe Graphics Processor
    Sound Card
    Optimized with Dolby Atmos®
    Screen Resolution
    QHD 2880 x 1800 OLED
    Hard Drives
    M.2 512GB
    Antivirus
    Defender / Malwarebytes
    Other Info
    …still on a horse.
I don’t know, maybe try playing with the following on your VM? Please don’t hold me to any of this.

Clear all cached files (CMD)

Code:
rd /s /q "%LocalAppData%\Microsoft\Edge\User Data\Default\Cache"

Remove cookies, cached files, history autofill etc (CMD)


Code:
rd /s /q "%LocalAppData%\Microsoft\Edge\User Data\Default"


Delete saved passwords (CMD)
But I think this only opens credential manager.

Code:
rundll32.exe keymgr.dll,KRShowKeyMgr

Batch for the above:
Again, re passwords, I think this only opens credential manager.

Batch:
@echo off
echo Closing Microsoft Edge...
taskkill /F /IM msedge.exe >nul 2>&1

echo Clearing Edge cache...
rd /s /q "%LocalAppData%\Microsoft\Edge\User Data\Default\Cache"

echo Removing all browsing data, cookies, and history...
rd /s /q "%LocalAppData%\Microsoft\Edge\User Data\Default"

echo Opening Windows Credential Manager for password removal...
rundll32.exe keymgr.dll,KRShowKeyMgr

echo Cleanup complete!
pause


Powershell to automate the process
Again with the passwords though?

Powershell:
# Close Edge to prevent file locks
Stop-Process -Name "msedge" -Force -ErrorAction SilentlyContinue

# Remove Cache & Temporary Files
Remove-Item -Path "$env:LOCALAPPDATA\Microsoft\Edge\User Data\Default\Cache" -Recurse -Force

# Clear Browsing History & Cookies
Remove-Item -Path "$env:LOCALAPPDATA\Microsoft\Edge\User Data\Default\History" -Force
Remove-Item -Path "$env:LOCALAPPDATA\Microsoft\Edge\User Data\Default\Cookies" -Force

# Delete Autofill Data
Remove-Item -Path "$env:LOCALAPPDATA\Microsoft\Edge\User Data\Default\Web Data" -Force

# Open Windows Credential Manager to remove saved passwords manually
cmd /c "rundll32.exe keymgr.dll,KRShowKeyMgr"

Write-Output "Microsoft Edge cache, cookies, history, and autofill data cleared successfully!"
 
Last edited:

My Computers

System One System Two

  • OS
    Windows 11 Pro 23H2 Build 22631.5472
    Computer type
    PC/Desktop
    Manufacturer/Model
    Sin-built
    CPU
    Intel(R) Core(TM) i7-4770K CPU @ 3.50GHz (4th Gen?)
    Motherboard
    ASUS ROG Maximus VI Formula
    Memory
    32.0 GB of I forget and the box is in storage.
    Graphics Card(s)
    Gigabyte nVidia GeForce GTX 1660 Super OC 6GB
    Sound Card
    Onboard
    Monitor(s) Displays
    5 x LG 25MS500-B - 1 x 24MK430H-B - 1 x Wacom Pro 22" Tablet
    Screen Resolution
    All over the place
    Hard Drives
    Too many to list.
    OS on Samsung 1TB 870 QVO SATA
    PSU
    Silverstone 1500
    Case
    NZXT Phantom 820 Full-Tower Case
    Cooling
    Noctua NH-D15 Elite Class Dual Tower CPU Cooler / 6 x EziDIY 120mm / 2 x Corsair 140mm somethings / 1 x 140mm Thermaltake something / 2 x 200mm Corsair.
    Keyboard
    Corsair K95 / Logitech diNovo Edge Wireless
    Mouse
    Logitech: G402 / G502 / Mx Masters / MX Air Cordless
    Internet Speed
    1000/400Mbps
    Browser
    All sorts
    Antivirus
    Kaspersky Premium
    Other Info
    I’m on a horse.
  • Operating System
    Windows 11 Pro 23H2 Build: 22631.4249
    Computer type
    Laptop
    Manufacturer/Model
    LENOVO Yoga 7i EVO OLED 14" Touchscreen i5 12 Core 16GB/512GB
    CPU
    Intel Core 12th Gen i5-1240P Processor (1.7 - 4.4GHz)
    Memory
    16GB LPDDR5 RAM
    Graphics card(s)
    Intel Iris Xe Graphics Processor
    Sound Card
    Optimized with Dolby Atmos®
    Screen Resolution
    QHD 2880 x 1800 OLED
    Hard Drives
    M.2 512GB
    Antivirus
    Defender / Malwarebytes
    Other Info
    …still on a horse.
Maybe use this? it should automatically remove stored passwords etc without interaction


Powershell:
# Close Edge to prevent file locks
Stop-Process -Name "msedge" -Force -ErrorAction SilentlyContinue

# Clear saved passwords, cookies, and browsing history
Remove-Item -Path "$env:LOCALAPPDATA\Microsoft\Edge\User Data\Default\Cookies" -Force
Remove-Item -Path "$env:LOCALAPPDATA\Microsoft\Edge\User Data\Default\History" -Force
Remove-Item -Path "$env:LOCALAPPDATA\Microsoft\Edge\User Data\Default\Web Data" -Force

# Reset Edge profile (removes all stored credentials)
Remove-Item -Path "$env:LOCALAPPDATA\Microsoft\Edge\User Data\Default" -Recurse -Force

Write-Output "Microsoft Edge saved passwords and browsing data removed successfully!"

lol I have no idea, but since you’re playing around…
 

My Computers

System One System Two

  • OS
    Windows 11 Pro 23H2 Build 22631.5472
    Computer type
    PC/Desktop
    Manufacturer/Model
    Sin-built
    CPU
    Intel(R) Core(TM) i7-4770K CPU @ 3.50GHz (4th Gen?)
    Motherboard
    ASUS ROG Maximus VI Formula
    Memory
    32.0 GB of I forget and the box is in storage.
    Graphics Card(s)
    Gigabyte nVidia GeForce GTX 1660 Super OC 6GB
    Sound Card
    Onboard
    Monitor(s) Displays
    5 x LG 25MS500-B - 1 x 24MK430H-B - 1 x Wacom Pro 22" Tablet
    Screen Resolution
    All over the place
    Hard Drives
    Too many to list.
    OS on Samsung 1TB 870 QVO SATA
    PSU
    Silverstone 1500
    Case
    NZXT Phantom 820 Full-Tower Case
    Cooling
    Noctua NH-D15 Elite Class Dual Tower CPU Cooler / 6 x EziDIY 120mm / 2 x Corsair 140mm somethings / 1 x 140mm Thermaltake something / 2 x 200mm Corsair.
    Keyboard
    Corsair K95 / Logitech diNovo Edge Wireless
    Mouse
    Logitech: G402 / G502 / Mx Masters / MX Air Cordless
    Internet Speed
    1000/400Mbps
    Browser
    All sorts
    Antivirus
    Kaspersky Premium
    Other Info
    I’m on a horse.
  • Operating System
    Windows 11 Pro 23H2 Build: 22631.4249
    Computer type
    Laptop
    Manufacturer/Model
    LENOVO Yoga 7i EVO OLED 14" Touchscreen i5 12 Core 16GB/512GB
    CPU
    Intel Core 12th Gen i5-1240P Processor (1.7 - 4.4GHz)
    Memory
    16GB LPDDR5 RAM
    Graphics card(s)
    Intel Iris Xe Graphics Processor
    Sound Card
    Optimized with Dolby Atmos®
    Screen Resolution
    QHD 2880 x 1800 OLED
    Hard Drives
    M.2 512GB
    Antivirus
    Defender / Malwarebytes
    Other Info
    …still on a horse.
Thank you guys
I will give it a try today
 

My Computers

System One System Two

  • OS
    Windows 11 Pro 24H2
    Computer type
    Laptop
    Manufacturer/Model
    Huawei MateBook D15
    CPU
    Ryzen 5 3500U
    Memory
    8GB
    Graphics Card(s)
    Vega 8
    Screen Resolution
    FHD
    Hard Drives
    256GB Samsung SSD + 1TB HDD
    Browser
    Microsoft Edge
    Antivirus
    ESET Smart Security Premium
  • Operating System
    Windows 10 Enterprise LTSC 21H2
    Computer type
    Laptop
    Manufacturer/Model
    MSI GS73 6RF Stealth Pro
    CPU
    intel core i7 6700HQ
    Memory
    16GB
    Graphics card(s)
    Nvidia Geforce GTX1060 (6GB)
    Screen Resolution
    FHD
    Hard Drives
    128GB SSD + 1TB HDD
    Browser
    Microsoft Edge
    Antivirus
    Windows Defender
Absolutely, but why re-invent the wheel when it's already been done by multiple cleaning options - Wise Disk Cleaner, Glary Utilities, et al

The persistence of the OP with the scripting option has a hint of assignment/homework about it ..... :unsure:
Just want to learn how they do the job and what do they clear in the background. As you know sometimes after using such applications, Windows becomes unstable or they cause some bugs! So I want to create my own script which is lightweight and fast.
it’s a bit complicated to explain but I’m working on a machine learning project which after using your device, it learns how you use it and makes some changes in the background. One of the purposes of this app is to optimize and cleanup windows. Another purpose is to recognize a tiny SSD to automatically move temporary files to your HDD. Disabling Sysmain and some system services must be activated due to user usage!
And also many other features that are really automated based on user’s hardware , software and behavior. I know that windows is doing such things but I want to be better than it. More intelligent than any other optimization software which will not harm your pc! This software will not be available for home users and only for IT pros.
 

My Computers

System One System Two

  • OS
    Windows 11 Pro 24H2
    Computer type
    Laptop
    Manufacturer/Model
    Huawei MateBook D15
    CPU
    Ryzen 5 3500U
    Memory
    8GB
    Graphics Card(s)
    Vega 8
    Screen Resolution
    FHD
    Hard Drives
    256GB Samsung SSD + 1TB HDD
    Browser
    Microsoft Edge
    Antivirus
    ESET Smart Security Premium
  • Operating System
    Windows 10 Enterprise LTSC 21H2
    Computer type
    Laptop
    Manufacturer/Model
    MSI GS73 6RF Stealth Pro
    CPU
    intel core i7 6700HQ
    Memory
    16GB
    Graphics card(s)
    Nvidia Geforce GTX1060 (6GB)
    Screen Resolution
    FHD
    Hard Drives
    128GB SSD + 1TB HDD
    Browser
    Microsoft Edge
    Antivirus
    Windows Defender
Again, re passwords, I think this only opens credential manager.
Yea it will open credential manager.
and this batch file was not helpful because it will really delete everything and you have to reconfig edge after running it.
I want something like this : edge://settings/clearBrowserData/clear
revo uninstaller pro has an option which will do the exact same thing. everything is clean but your browser will not sign out of MS account and settings are intact.
do you know which directories does the Revo clean? (History cleaner)
 

My Computers

System One System Two

  • OS
    Windows 11 Pro 24H2
    Computer type
    Laptop
    Manufacturer/Model
    Huawei MateBook D15
    CPU
    Ryzen 5 3500U
    Memory
    8GB
    Graphics Card(s)
    Vega 8
    Screen Resolution
    FHD
    Hard Drives
    256GB Samsung SSD + 1TB HDD
    Browser
    Microsoft Edge
    Antivirus
    ESET Smart Security Premium
  • Operating System
    Windows 10 Enterprise LTSC 21H2
    Computer type
    Laptop
    Manufacturer/Model
    MSI GS73 6RF Stealth Pro
    CPU
    intel core i7 6700HQ
    Memory
    16GB
    Graphics card(s)
    Nvidia Geforce GTX1060 (6GB)
    Screen Resolution
    FHD
    Hard Drives
    128GB SSD + 1TB HDD
    Browser
    Microsoft Edge
    Antivirus
    Windows Defender
Did you try the powershel script in post 15?

This section from the powershell script seem like specific cache files

Code:
Clear saved passwords, cookies, and browsing history
Remove-Item -Path "$env:LOCALAPPDATA\Microsoft\Edge\User Data\Default\Cookies" -Force
Remove-Item -Path "$env:LOCALAPPDATA\Microsoft\Edge\User Data\Default\History" -Force
Remove-Item -Path "$env:LOCALAPPDATA\Microsoft\Edge\User Data\Default\Web Data" -Force

Where as the following rd /s /q "%LocalAppData%\Microsoft\Edge\User Data\Default" from the batch file may be the entire profile.
 

My Computers

System One System Two

  • OS
    Windows 11 Pro 23H2 Build 22631.5472
    Computer type
    PC/Desktop
    Manufacturer/Model
    Sin-built
    CPU
    Intel(R) Core(TM) i7-4770K CPU @ 3.50GHz (4th Gen?)
    Motherboard
    ASUS ROG Maximus VI Formula
    Memory
    32.0 GB of I forget and the box is in storage.
    Graphics Card(s)
    Gigabyte nVidia GeForce GTX 1660 Super OC 6GB
    Sound Card
    Onboard
    Monitor(s) Displays
    5 x LG 25MS500-B - 1 x 24MK430H-B - 1 x Wacom Pro 22" Tablet
    Screen Resolution
    All over the place
    Hard Drives
    Too many to list.
    OS on Samsung 1TB 870 QVO SATA
    PSU
    Silverstone 1500
    Case
    NZXT Phantom 820 Full-Tower Case
    Cooling
    Noctua NH-D15 Elite Class Dual Tower CPU Cooler / 6 x EziDIY 120mm / 2 x Corsair 140mm somethings / 1 x 140mm Thermaltake something / 2 x 200mm Corsair.
    Keyboard
    Corsair K95 / Logitech diNovo Edge Wireless
    Mouse
    Logitech: G402 / G502 / Mx Masters / MX Air Cordless
    Internet Speed
    1000/400Mbps
    Browser
    All sorts
    Antivirus
    Kaspersky Premium
    Other Info
    I’m on a horse.
  • Operating System
    Windows 11 Pro 23H2 Build: 22631.4249
    Computer type
    Laptop
    Manufacturer/Model
    LENOVO Yoga 7i EVO OLED 14" Touchscreen i5 12 Core 16GB/512GB
    CPU
    Intel Core 12th Gen i5-1240P Processor (1.7 - 4.4GHz)
    Memory
    16GB LPDDR5 RAM
    Graphics card(s)
    Intel Iris Xe Graphics Processor
    Sound Card
    Optimized with Dolby Atmos®
    Screen Resolution
    QHD 2880 x 1800 OLED
    Hard Drives
    M.2 512GB
    Antivirus
    Defender / Malwarebytes
    Other Info
    …still on a horse.
So possibly by removing the entire “Default” folder, the profile may remain intact



Powershell:
[CODE=powershell]# Close Edge to prevent file locks
Stop-Process -Name "msedge" -Force -ErrorAction SilentlyContinue

# Clear saved passwords, cookies, and browsing history
Remove-Item -Path "$env:LOCALAPPDATA\Microsoft\Edge\User Data\Default\Cookies" -Force
Remove-Item -Path "$env:LOCALAPPDATA\Microsoft\Edge\User Data\Default\History" -Force
Remove-Item -Path "$env:LOCALAPPDATA\Microsoft\Edge\User Data\Default\Web Data" -Force

Write-Output "TaDa!?
Removed

Code:
# Reset Edge profile (removes all stored credentials)
Remove-Item -Path "$env:LOCALAPPDATA\Microsoft\Edge\User Data\Default" -Recurse -Force
 

My Computers

System One System Two

  • OS
    Windows 11 Pro 23H2 Build 22631.5472
    Computer type
    PC/Desktop
    Manufacturer/Model
    Sin-built
    CPU
    Intel(R) Core(TM) i7-4770K CPU @ 3.50GHz (4th Gen?)
    Motherboard
    ASUS ROG Maximus VI Formula
    Memory
    32.0 GB of I forget and the box is in storage.
    Graphics Card(s)
    Gigabyte nVidia GeForce GTX 1660 Super OC 6GB
    Sound Card
    Onboard
    Monitor(s) Displays
    5 x LG 25MS500-B - 1 x 24MK430H-B - 1 x Wacom Pro 22" Tablet
    Screen Resolution
    All over the place
    Hard Drives
    Too many to list.
    OS on Samsung 1TB 870 QVO SATA
    PSU
    Silverstone 1500
    Case
    NZXT Phantom 820 Full-Tower Case
    Cooling
    Noctua NH-D15 Elite Class Dual Tower CPU Cooler / 6 x EziDIY 120mm / 2 x Corsair 140mm somethings / 1 x 140mm Thermaltake something / 2 x 200mm Corsair.
    Keyboard
    Corsair K95 / Logitech diNovo Edge Wireless
    Mouse
    Logitech: G402 / G502 / Mx Masters / MX Air Cordless
    Internet Speed
    1000/400Mbps
    Browser
    All sorts
    Antivirus
    Kaspersky Premium
    Other Info
    I’m on a horse.
  • Operating System
    Windows 11 Pro 23H2 Build: 22631.4249
    Computer type
    Laptop
    Manufacturer/Model
    LENOVO Yoga 7i EVO OLED 14" Touchscreen i5 12 Core 16GB/512GB
    CPU
    Intel Core 12th Gen i5-1240P Processor (1.7 - 4.4GHz)
    Memory
    16GB LPDDR5 RAM
    Graphics card(s)
    Intel Iris Xe Graphics Processor
    Sound Card
    Optimized with Dolby Atmos®
    Screen Resolution
    QHD 2880 x 1800 OLED
    Hard Drives
    M.2 512GB
    Antivirus
    Defender / Malwarebytes
    Other Info
    …still on a horse.
Back
Top Bottom