Is it a Virus?
✔ NO - Safe
Must be located in C:\Windows\System32\compact.exe or C:\Windows\SysWOW64\compact.exe with a valid signature from Microsoft.
Warning
Typically a legitimate system task
If you see compact.exe running unexpectedly with no compression activity, verify command invocation or scheduled tasks.
Can I Disable?
✔ YES
You can avoid using it or disable NTFS compression on a volume; this won't remove Windows.
What is compact.exe?
compact.exe is Windows' NTFS compression utility. It compresses and decompresses files and folders on NTFS volumes to save disk space, and can operate recursively on directories via command-line options. It’s a low-level system tool often used by admins and maintenance scripts to optimize storage usage.
Compact.exe applies the NTFS compression attribute to target files or folders, reducing on-disk size by leveraging NTFS compression. It can be invoked with /C to compress, /U to uncompress, and /S to apply recursively, typically from an elevated command prompt.
Quick Fact: NTFS compression has been a Windows feature since Windows NT; compact.exe is the command-line interface for per-item compression control.
Types of NTFS Compression Tasks
- Single File Compression: Apply compression to an individual file to save space.
- Directory Compression: Recursively compress all files within a folder (/S).
- Executable Compression Toggle: Control NTFS compression behavior for executable files (/EXE:ON or OFF).
- Uncompression: Uncompress files or directories to restore access without compression.
- Selective Compression: Compress specific paths selectively using drive-letter syntax.
- Maintenance Scripts: Used in admin scripts to optimize storage during maintenance windows.
Is compact.exe Safe?
Yes, compact.exe is safe when it's the legitimate Windows system tool located in the System32 or SysWOW64 folder and not modified by malware.
Is compact.exe a Virus or Malware?
The genuine compact.exe is not malware. Malware may spoof names, so verify the file path and digital signature.
How to Tell if compact.exe is Legitimate or Malware
- File Location: Must be in
C:\Windows\System32\compact.exe or C:\Windows\SysWOW64\compact.exe. Other locations are suspicious.
- Digital Signature: Right-click the file in Explorer -> Properties -> Digital Signatures. Should show "Microsoft Corporation" or "Microsoft Windows".
- Resource Usage: Idle usage is minimal. Significant CPU usage without performing compression is suspicious.
- Behavior: Should only run when you invoke it explicitly or via legitimate scheduled tasks.
Red Flags: If compact.exe is located outside System32/SysWOW64, lacks a valid signature, or runs constantly without compression tasks, scan with Windows Defender or your security suite.
Why Is compact.exe Running on My PC?
compact.exe runs when a compression task is initiated by your actions, a script, or a maintenance job. It may also run as part of scheduled storage optimization tasks.
Reasons it's running:
- Active Compression: A user or admin started compression on files or folders to save disk space.
- Directory Recursion: Using /S to compress directories recursively can spawn multiple operations.
- Scheduled Maintenance: A scheduled task or maintenance window calls compact.exe to compress stale or cache data.
- Backup Preparations: Before backups, some processes compress data to reduce backup size.
- System Performance Tuning: NTFS compression usage can be part of storage optimization policies deployed by admins.
Can I Disable or Remove compact.exe?
Disabling compact.exe is possible by avoiding compression tasks and turning off NTFS compression on volumes. It is not recommended to delete the system binary, as Windows relies on it for compression management.
How to Stop compact.exe
- End Running Task: In Task Manager, end any active compact.exe process.
- Disable Future Tasks: Open Task Scheduler and disable any tasks that invoke compact.exe.
- Disable Volume Compression: Right-click the drive or folder, Properties > General > uncheck 'Compress this drive to save disk space' and apply to subfolders.
- Prevent Recursion: Avoid scripts that call compact.exe with /S or /C on large trees.
- Review Scripts: Audit logon/logoff and maintenance scripts for any calls to compact.exe and remove or adjust.
How to Disable NTFS Compression (Not Uninstall)
- ✔ Open File Explorer > This PC > Right-click a drive > Properties > General > uncheck 'Compress this drive to save disk space' > Apply
- ✔ For folders, right-click > Properties > General > uncheck 'Compress contents to save disk space' > Apply to this folder and subfolders
- ✔ Note: You cannot uninstall compact.exe as it is a Windows system utility.
Common Problems: High CPU or Disk I/O During Compression
If compact.exe is performing compression, you may notice CPU or I/O spikes. Here are common causes and practical fixes.
Common Causes & Solutions
- Large directory trees: Limit scope; compress only needed directories or use /S selectively.
- Low I/O bandwidth: Schedule compression during idle hours to avoid saturating disk.
- NTFS fragmentation: Defragment drive or avoid compressing heavily fragmented volumes.
- Redundant compression: Avoid compressing already compressed files (e.g., .zip, .jpg) unless necessary.
- Background system tasks: If compression is triggered by maintenance tasks, adjust scheduling or disable non-critical tasks.
- Misapplied /EXE settings: Review /EXE:ON/OFF to ensure only desired executable files are compressed.
Quick Fixes:
1. Identify active compression tasks with Task Manager or Resource Monitor.
2. Limit compression scope using /S for directories and avoid large trees.
3. Disable compression on unneeded folders via GUI or using /U on paths.
4. Schedule compression during off-peak times.
5. Check for malware that may call compression unexpectedly (rare).
Frequently Asked Questions
Is compact.exe a virus?
No, the genuine compact.exe is a Windows system utility located in C:\Windows\System32\compact.exe and is digitally signed by Microsoft Corporation. Malware may imitate names.
What does compact.exe do on Windows?
compact.exe applies NTFS compression to files or directories to save disk space. It can compress or uncompress items via /C or /U and can operate recursively with /S.
Where is compact.exe located?
Typically in C:\Windows\System32\compact.exe or C:\Windows\SysWOW64\compact.exe. Other locations are suspicious.
Can I disable compact.exe?
Yes, by avoiding compression tasks and turning off NTFS compression on volumes. It is not recommended to delete the binary.
How do I check if compact.exe is legitimate?
Verify the file path matches System32, check the digital signature, and confirm normal system behavior; run a security scan if in doubt.
Will compression harm my files?
NTFS compression is transparent. It may slightly impact performance on some drives and during decompressing, but data integrity remains intact.