Skip to main content

Clear DirectX recent application history

Apply Now
Works with Windows 10 and 11

  • Windows only
  • Single action
  • Impact: Safe
  • Batch (batchfile)
  • Administrator rights required
  • Irreversible

Overview

This script removes the most recent application usage data stored by DirectX to enhance privacy.

DirectX is a set of Windows components that helps software (often games and multimedia applications) to work directly with video and audio hardware 1. It logs the most recent application data in the system registry 2. Attackers exploit this information to gather insights about a target's system or network 3. Forensic analysts use this information to study your behavior 4.

This script enhances your privacy by removing traces of the last DirectX applications or games you have used. It can also improve system performance by freeing up system resources.

This script deletes all registry values under the key HKCU\Software\Microsoft\Direct3D\MostRecentApplication 2 3 4.

Caution

This action may slightly impact DirectX's ability to optimize performance for recently used applications.

Tips & Tricks

    Safe for General Use

    All actions in this script is recommended for all users.

    It helps to improve privacy without affecting stability.

    Irreversible Changes

    This script is irreversible, meaning there is no straightforward method to restore changes once applied.

    Consider creating a system restore point before doing any changes.

Apply Now

Choose one of three ways to apply:

Download script

Download and run the script directly
Direct application
Offline usage
Easy-to-apply

How to download and run
  1. Download the script file by clicking on the  
    Apply protection
      button above.
  2. If warned by your browser, keep the file.
  3. Open the downloaded file.
  4. Once it's done, press any key to exit the window.
  5. Restart your computer for all changes to take affect.

Apply with privacy.sexy

Guided, automated application with safety checks
Recommended for most users
Includes safety checks

Open privacy.sexy

How to use privacy.sexy

privacy.sexy is free and open-source application that lets securely apply this action easily with optionally more advanced options.

  1. Open or download the desktop application
  2. Search for the script name: Clear DirectX recent application history.
  3. Check the script by clicking on the checkbox.
  4. Click on Run button at the bottom of the page.

Run commands

Copy and run commands manually
Requires technical knowledge
Apply changes
:: Clear registry values from "HKCU\Software\Microsoft\Direct3D\MostRecentApplication" 
PowerShell -ExecutionPolicy Unrestricted -Command "$rootRegistryKeyPath = 'HKCU\Software\Microsoft\Direct3D\MostRecentApplication'; function Clear-RegistryKeyValues { try { $currentRegistryKeyPath = $args[0]; Write-Output "^""Clearing registry values from `"^""$currentRegistryKeyPath`"^""."^""; $formattedRegistryKeyPath = $currentRegistryKeyPath -replace '^([^\\]+)', '$1:'; if (-Not (Test-Path -LiteralPath $formattedRegistryKeyPath)) { Write-Output "^""Skipping: Registry key not found: `"^""$formattedRegistryKeyPath`"^""."^""; return; }; $directValueNames=(Get-Item -LiteralPath $formattedRegistryKeyPath -ErrorAction Stop | Select-Object -ExpandProperty Property); if (-Not $directValueNames) { Write-Output 'Skipping: Registry key has no direct values.'; } else { foreach ($valueName in $directValueNames) { Remove-ItemProperty -LiteralPath $formattedRegistryKeyPath -Name $valueName -ErrorAction Stop; Write-Output "^""Successfully deleted value: `"^""$valueName`"^"" from `"^""$formattedRegistryKeyPath`"^""."^""; }; Write-Output "^""Successfully cleared all direct values in `"^""$formattedRegistryKeyPath`"^""."^""; }; } catch { Write-Error "^""Failed to clear registry values in `"^""$formattedRegistryKeyPath`"^"". Error: $_"^""; Exit 1; }; }; Clear-RegistryKeyValues $rootRegistryKeyPath"
How to run commands
  1. Open Command Prompt as administrator.

    Step-by-step guide
    1. Click on Start menu

    2. Type cmd

    3. Right click on Command Prompt and select Run as administrator

    4. Click on Yes to allow the app to make changes.


    Animated demonstration of opening Command Prompt as administrator in Windows 11
  2. Right click on command prompt to paste it.
  3. Press Enter to apply remaining code.
  4. Copy the code above.
  5. Paste the code into Command Prompt.
  6. Press Enter to apply the code.
  7. Optionally, restart your computer.
    Some scripts requires restarting your computer to take affect.

Similar Guides

Guides below work together with this guide to protect your privacy.

This action belongs to Clear recent activityThis category includes scripts that erase traces of recent user activities on Windows. These scripts enhance privacy by removing records of accessed files, used applications, and changed system settings. Clearing recent activity is crucial for protecting your privacy. Your computer keeps detailed logs ... Read more on category page ▶