I've also had the DevicesCensus error the day after I updated to 1803.
Simply block(debug) it by adding this key to the registry.
Code:
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\DeviceCensus.exe]
"Debugger"="C:\\Windows\\System32\\systray.exe"
Or use this script
Code:
@echo OFF
:: Check for administrative permissions
>nul 2>&1 "%SYSTEMROOT%\system32\cacls.exe" "%SYSTEMROOT%\system32\config\system"
:: If error flag set, we do not have admin.
if '%errorlevel%' NEQ '0' (
echo Requesting administrative privileges...
goto UACPrompt
) else ( goto gotAdmin )
:UACPrompt
echo Set UAC = CreateObject^("Shell.Application"^) > "%temp%\getadmin.vbs"
echo UAC.ShellExecute "cmd.exe", "/C """"%~f0""""", , "runas", 1 >> "%temp%\getadmin.vbs"
cscript "%temp%\getadmin.vbs"
exit /B
:gotAdmin
if exist "%temp%\getadmin.vbs" ( del "%temp%\getadmin.vbs" )
pushd "%CD%"
CD /D "%~dp0"
:: BatchGotAdmin (Run as Admin code ends)
:: ======================= Block DeviceCensus.exe =======================
echo.
reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\DeviceCensus.exe" > NUL 2>&1
if %ERRORLEVEL% EQU 0 goto blocked
:block
reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\DeviceCensus.exe" /v Debugger /d "%Windir%\System32\systray.exe" /f
echo.
echo DeviceCensus.exe is now blocked.
goto end
:blocked
echo DeviceCensus.exe is already blocked.
:end
echo.
echo.
echo Press any key to exit...
pause >nul