# Remove Microsoft Paint { ... }: { name = "no-paint"; auditScript = '' @echo off echo Removing Microsoft Paint... :: Take ownership and delete mspaint.exe takeown /f "C:\Windows\System32\mspaint.exe" >nul 2>nul icacls "C:\Windows\System32\mspaint.exe" /grant Administrators:F >nul 2>nul del /f "C:\Windows\System32\mspaint.exe" 2>nul :: Remove Paint optional feature dism /online /Remove-Capability /CapabilityName:Microsoft.Windows.MSPaint~~~~0.0.1.0 /NoRestart 2>nul :: Remove Paint shortcuts del /q "%ProgramData%\Microsoft\Windows\Start Menu\Programs\Accessories\Paint.lnk" 2>nul :: Remove PBrush class registration reg delete "HKLM\SOFTWARE\Classes\PBrush" /f 2>nul reg delete "HKLM\SOFTWARE\Classes\pbrush" /f 2>nul ''; }