Disable device and configuration data collection tool
- Windows onlyThis script improves your privacy on Windows
- Single actionThis page belongs to a script, containing basic changes to achieve a task.
- Impact: Minimum
System Functionality / Data Loss Risk: Low
This action improves privacy with minimal impact when you run the recommended script.
- Batch (batchfile)These changes use Windows system commands to update your settings.
- Administrator rights requiredThis script requires privilege access to do the system changes
- Fully reversible
You can fully restore this action (revert back to the original behavior) using this website.
The restore/revert methods provided here can help you fix issues.
Overview
This script prevents the execution of devicecensus.exe
, also known as the "device and configuration data collection tool" 1.
This tool is located at %SYSTEMROOT%\System32\DeviceCensus.exe
1 2 and is responsible for gathering data used for compatibility updates 3.
Disabling this tool helps keeping the device's data private and preventing its usage for diagnostic collections or determining update
applicability 1 2 3.
Sources
- Monitor connection health - Configuration Manager. Microsoft Learn. (2023).
Original: https://learn.microsoft.com/en-us/mem/configmgr/desktop-analytics/monitor-connection-health
Archived: https://web.archive.org/web/20231017234102/https://learn.microsoft.com/en-us/mem/configmgr/desktop-analytics/monitor-connection-health#census-data-collection - DeviceCensus.exe. Device Census. STRONTIC. strontic.github.io. (2023).
Original: https://strontic.github.io/xcyclopedia/library/DeviceCensus.exe-594993E23161BB37E365D8784DE020EA.html
Archived: https://web.archive.org/web/20231017234628/https://strontic.github.io/xcyclopedia/library/DeviceCensus.exe-594993E23161BB37E365D8784DE020EA.html - Update to Windows 10 Version 1703, Version 1607, Version 1511, and Version 1507 for update applicability: March 15, 2018 - Microsoft Support. (2023).
Original: https://support.microsoft.com/en-us/topic/update-to-windows-10-version-1703-version-1607-version-1511-and-version-1507-for-update-applicability-march-15-2018-3aad1c66-2b88-c012-4623-dee1410891ad
Archived: https://web.archive.org/web/20231017234127/https://support.microsoft.com/en-us/topic/update-to-windows-10-version-1703-version-1607-version-1511-and-version-1507-for-update-applicability-march-15-2018-3aad1c66-2b88-c012-4623-dee1410891ad
Apply Now
Choose one of three ways to apply:
Download script
Download and run the script directly- No app needed
- Offline usage
- Easy-to-apply
- Free
- Open-source
Help
How to apply or restore "Disable device and configuration data collection tool" using script
- ≈ 2 min to complete
- Tools: Web Browser
- Difficulty: Simple
- ≈ 5 instructions
- 1
Download
Download the script file by clicking on thebutton above.
Use button above to restore changes. - 2
Keep the file
If warned by your browser, keep the file. - 3
Open
Open the downloaded file. - 4
Exit
Once it's done, press any key to exit the window. - 5
Restart
Restart your computer for all changes to take effect.
Apply with privacy.sexy
Guided, automated application with safety checks- Recommended for most users
- Includes safety checks
- Free
- Open-source
- Popular
- Offline/Online usage
Help
How to apply or restore "Disable device and configuration data collection tool" using privacy.sexy
- ≈ 3 min to complete
- Tools: privacy.sexy
- Difficulty: Simple
- ≈ 4 instructions
- 2
Choose script
- Search for the script name: Disable device and configuration data collection tool
- Check the script by clicking on the checkbox.
- 3
Run
Click on ▶️ Run button at the bottom of the page.This button only appears on desktop version (recommended). On browser, use 💾 Save button.
- Apply
- Revert
:: Check and terminate the running process "DeviceCensus.exe"
tasklist /fi "ImageName eq DeviceCensus.exe" /fo csv 2>NUL | find /i "DeviceCensus.exe">NUL && (
echo DeviceCensus.exe is running and will be killed.
taskkill /f /im DeviceCensus.exe
) || (
echo Skipping, DeviceCensus.exe is not running.
)
:: Configure termination of "DeviceCensus.exe" immediately upon its startup
:: Set the registry value: "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\DeviceCensus.exe!Debugger"
PowerShell -ExecutionPolicy Unrestricted -Command "$registryPath = 'HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\DeviceCensus.exe'; $data = '%SYSTEMROOT%\System32\taskkill.exe'; reg add 'HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\DeviceCensus.exe' /v 'Debugger' /t 'REG_SZ' /d "^""$data"^"" /f"
:: Add a rule to prevent the executable "DeviceCensus.exe" from running via File Explorer
PowerShell -ExecutionPolicy Unrestricted -Command "$executableFilename='DeviceCensus.exe'; try { $registryPathForDisallowRun='HKCU:\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\DisallowRun'; $existingBlockEntries = Get-ItemProperty -Path "^""$registryPathForDisallowRun"^"" -ErrorAction Ignore; $nextFreeRuleIndex = 1; if ($existingBlockEntries) { $existingBlockingRuleForExecutable = $existingBlockEntries.PSObject.Properties | Where-Object { $_.Value -eq $executableFilename }; if ($existingBlockingRuleForExecutable) { $existingBlockingRuleIndexForExecutable = $existingBlockingRuleForExecutable.Name; Write-Output "^""Skipping, no action needed: '$executableFilename' is already blocked under rule index `"^""$existingBlockingRuleIndexForExecutable`"^""."^""; exit 0; }; $occupiedRuleIndexes = $existingBlockEntries.PSObject.Properties | Where-Object { $_.Name -Match '^\d+$' } | Select -ExpandProperty Name; if ($occupiedRuleIndexes) { while ($occupiedRuleIndexes -Contains $nextFreeRuleIndex) { $nextFreeRuleIndex += 1; }; }; }; Write-Output "^""Adding block rule for `"^""$executableFilename`"^"" under rule index `"^""$nextFreeRuleIndex`"^""."^""; if (!(Test-Path $registryPathForDisallowRun)) { New-Item -Path "^""$registryPathForDisallowRun"^"" -Force -ErrorAction Stop | Out-Null; }; New-ItemProperty -Path "^""$registryPathForDisallowRun"^"" -Name "^""$nextFreeRuleIndex"^"" -PropertyType String -Value "^""$executableFilename"^"" ` -ErrorAction Stop | Out-Null; Write-Output "^""Successfully blocked `"^""$executableFilename`"^"" with rule index `"^""$nextFreeRuleIndex`"^""."^""; } catch { Write-Error "^""Failed to block `"^""$executableFilename`"^"": $_"^""; Exit 1; }"
:: Activate the DisallowRun policy to block specified programs from running via File Explorer
PowerShell -ExecutionPolicy Unrestricted -Command "try { $fileExplorerDisallowRunRegistryPath = 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer'; $currentDisallowRunPolicyValue = Get-ItemProperty -Path "^""$fileExplorerDisallowRunRegistryPath"^"" -Name 'DisallowRun' -ErrorAction Ignore | Select -ExpandProperty DisallowRun; if ([string]::IsNullOrEmpty($currentDisallowRunPolicyValue)) { Write-Output "^""Creating DisallowRun policy at `"^""$fileExplorerDisallowRunRegistryPath`"^""."^""; if (!(Test-Path $fileExplorerDisallowRunRegistryPath)) { New-Item -Path "^""$fileExplorerDisallowRunRegistryPath"^"" -Force -ErrorAction Stop | Out-Null; }; New-ItemProperty -Path "^""$fileExplorerDisallowRunRegistryPath"^"" -Name 'DisallowRun' -Value 1 -PropertyType DWORD -Force -ErrorAction Stop | Out-Null; Write-Output 'Successfully activated DisallowRun policy.'; Exit 0; }; if ($currentDisallowRunPolicyValue -eq 1) { Write-Output 'Skipping, no action needed: DisallowRun policy is already in place.'; Exit 0; }; Write-Output 'Updating DisallowRun policy from unexpected value `"^""$currentDisallowRunPolicyValue`"^"" to `"^""1`"^"".'; Set-ItemProperty -Path "^""$fileExplorerDisallowRunRegistryPath"^"" -Name 'DisallowRun' -Value 1 -Type DWORD -Force -ErrorAction Stop | Out-Null; Write-Output 'Successfully activated DisallowRun policy.'; } catch { Write-Error "^""Failed to activate DisallowRun policy: $_"^""; Exit 1; }"
Ijo6IFJlbW92ZSBjb25maWd1cmF0aW9uIHByZXZlbnRpbmcgXCJEZXZpY2VDZW5zdXMuZXhlXCIgZnJvbSBzdGFydGluZ1xuOjogRGVsZXRlIHRoZSByZWdpc3RyeSB2YWx1ZSBcIkhLTE1cXFNPRlRXQVJFXFxNaWNyb3NvZnRcXFdpbmRvd3MgTlRcXEN1cnJlbnRWZXJzaW9uXFxJbWFnZSBGaWxlIEV4ZWN1dGlvbiBPcHRpb25zXFxEZXZpY2VDZW5zdXMuZXhlIURlYnVnZ2VyXCJcblBvd2VyU2hlbGwgLUV4ZWN1dGlvblBvbGljeSBVbnJlc3RyaWN0ZWQgLUNvbW1hbmQgXCJyZWcgZGVsZXRlICdIS0xNXFxTT0ZUV0FSRVxcTWljcm9zb2Z0XFxXaW5kb3dzIE5UXFxDdXJyZW50VmVyc2lvblxcSW1hZ2UgRmlsZSBFeGVjdXRpb24gT3B0aW9uc1xcRGV2aWNlQ2Vuc3VzLmV4ZScgL3YgJ0RlYnVnZ2VyJy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c2lvblxcUG9saWNpZXNcXEV4cGxvcmVyXFxEaXNhbGxvd1J1bicgLUVycm9yQWN0aW9uIElnbm9yZTsgaWYgKCRyZW1haW5pbmdCbG9ja2luZ1J1bGVzKSB7IFdyaXRlLU91dHB1dCAnU2tpcHBpbmcgZGVhY3RpdmF0aW5nIERpc2FsbG93UnVuIHBvbGljeSwgdGhlcmUgYXJlIHN0aWxsIGFjdGl2ZSBydWxlcy4nOyBFeGl0IDA7IH07IFdyaXRlLU91dHB1dCAnTm8gcmVtYWluaW5nIHJ1bGVzLCBkZWxldGluZyBEaXNhbGxvd1J1biBwb2xpY3kuJzsgUmVtb3ZlLUl0ZW1Qcm9wZXJ0eSAtUGF0aCAnSEtDVTpcXFNvZnR3YXJlXFxNaWNyb3NvZnRcXFdpbmRvd3NcXEN1cnJlbnRWZXJzaW9uXFxQb2xpY2llc1xcRXhwbG9yZXInIC1OYW1lICdEaXNhbGxvd1J1bicgLUZvcmNlIC1FcnJvckFjdGlvbiBTdG9wOyBXcml0ZS1PdXRwdXQgJ1N1Y2Nlc3NmdWxseSByZXN0b3JlZCBEaXNhbGxvd1J1biBwb2xpY3kuJzsgfSBjYXRjaCB7IFdyaXRlLUVycm9yIFwiXlwiXCJGYWlsZWQgdG8gcmVzdG9yZSBEaXNhbGxvd1J1biBwb2xpY3k6ICRfXCJeXCJcIjsgRXhpdCAxOyB9XCIi
Help
How to apply or restore "Disable device and configuration data collection tool" using commands
- ≈ 2 min to complete
- Tools: Command Prompt
- Difficulty: Medium
- ≈ 3 instructions
- 1
Open Command Prompt
Open Command Prompt as Administrator. - 2
Copy code
Copy the code: - 3
Paste & run
Paste the commands into Command Prompt and press Enter to run.Some changes require a system restart to take effect
Similar Guides
Wider Goal
Guides below includes this guide to achieve a wider goal.See other more general settings that includes this one as one of its actions.
These plans combine multiple privacy settings, including this one, for stronger protection.
- Disable census data collection
- Disable Windows telemetry and data collection
- Disable OS data collection
This category focuses on disabling Windows Census. Windows Census is a component that collects device configuration data. This configuration data includes your ope...
Windows online privacy maintenance tip: disable Windows telemetry and data collection to enhance secure data privacy maintenance — this feature helps you analyze h...
Disable OS data collection — to reduce data exposure leveraging important data privacy safeguard on Windows. What follows is, this guidance provides instructions t...
Same Goal
Other guides in Disable census data collectionSee settings that are in the same category as this guide.
Using other actions in the same category may help you achieve your goal better.
About the Creators
These people have authored this documentation and written its scripts:
Reviewed By
This guide has undergone comprehensive auditing and peer review:Expert review by undergroundwires
- Verified technical accuracy and editorial standards
- Assessed system impact and user privacy risks
Public review by large community
- Privacy enthusiasts and professionals peer-reviewed
- Millions of end-users tested across different environments
History
We continually monitor our guides, their impact and all other privacy options. We update our guides when new information becomes available. On every update, we publicly store who made the change, what has been changed, why the change was made and when the change was made.