计算机配置 — 管理模板 — Windows 组件 — 数据收集和预览版本 对应 注册表 位置 项目

发布时间 2023-11-06 18:35:42作者: suv789

@echo off

:: 切换对预览体验成员内部版本的用户控制
reg add "HKLM\SOFTWARE\Policies\Microsoft\WindowsPreviewBuilds" /v AllowBuildPreview /t REG_DWORD /d 1 /f

:: 允许商业数据管道
reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\DataCollection" /v CommercialDataOptIn /t REG_DWORD /d 1 /f

:: 允许进行桌面分析处理
reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\CloudStore\Store\Cache\DefaultAccount$$windows.data.blueskyDev\Current\Default$windows.data.blueskyDev.cloud\windows.data.blueskyDev\Features" /v DesktopAnalyticsProcessingAllowed /t REG_DWORD /d 1 /f

:: 允许发送 Windows 诊断数据中的设备名称
reg add "HKLM\Software\Policies\Microsoft\Windows\DataCollection" /v DeviceNameAllowed /t REG_DWORD /d 1 /f

:: 允许诊断数据
reg add "HKLM\Software\Policies\Microsoft\Windows\DataCollection" /v AllowTelemetry /t REG_DWORD /d 1 /f

:: 允许进行更新合规性处理
reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate" /v AllowUpdateCompliance /t REG_DWORD /d 1 /f

:: 允许 WUfB 云处理
reg add "HKLM\Software\Policies\Microsoft\Windows\WindowsUpdate" /v WUfBEnableCloudPolicy /t REG_DWORD /d 1 /f

:: 配置商用ID
reg add "HKLM\Software\Policies\Microsoft\Windows\DataCollection" /v CommercialId /t REG_SZ /d "YourCommercialIDHere" /f

:: 配置桌面分析的诊断数据上传终结点
reg add "HKLM\Software\Policies\Microsoft\Windows\DataCollection" /v DesktopAnalyticsDataUploadEndpoint /t REG_SZ /d "https://youruploadendpoint.com" /f

:: 配置诊断数据选择加入更改通知
reg add "HKLM\Software\Policies\Microsoft\Windows\DataCollection" /v DiagnosticDataChangeNotificationAllowed /t REG_DWORD /d 1 /f

:: 配置诊断数据选择加入设置用户界面
reg add "HKLM\Software\Policies\Microsoft\Windows\DataCollection" /v DiagnosticDataViewerAllowed /t REG_DWORD /d 1 /f

:: 禁止删除诊断数据
reg add "HKLM\Software\Policies\Microsoft\Windows\DataCollection" /v DisableDeleteDiagnosticData /t REG_DWORD /d 1 /f

:: 禁用诊断数据查看器
reg add "HKLM\Software\Policies\Microsoft\Windows\DataCollection" /v DisableDiagnosticDataViewer /t REG_DWORD /d 1 /f

:: 为“已连接的用户体验和遥测”服务进行经验证的代理使用配置
reg add "HKLM\Software\Policies\Microsoft\Windows\DataCollection" /v ConnectedUserExperiencesAndTelemetryProxyAuthConfigured /t REG_DWORD /d 1 /f

:: 禁用 OneSettings 下载
reg add "HKLM\Software\Policies\Microsoft\Windows\DataCollection" /v DisableOneSettingsDownload /t REG_DWORD /d 1 /f

:: 启用 OneSettings 审核
reg add "HKLM\Software\Policies\Microsoft\Windows\DataCollection" /v EnableOneSettingsAudit /t REG_DWORD /d 1 /f

:: 限制诊断日志收集(可以根据需要修改 REG_DWORD 的值)
reg add "HKLM\Software\Policies\Microsoft\Windows\DataCollection" /v DiagnosticLogCollectionAllowed /t REG_DWORD /d 2 /f

:: 限制转储收集
reg add "HKLM\Software\Policies\Microsoft\Windows\DataCollection" /v DumpCollectionAllowed /t REG_DWORD /d 2 /f

:: 限制可选的桌面分析诊断数据
reg add "HKLM\Software\Policies\Microsoft\Windows\DataCollection" /v OptionalDesktopAnalyticsDataCollectionAllowed /t REG_DWORD /d 2 /f

:: 配置互连用户体验和遥测
reg add "HKLM\Software\Policies\Microsoft\Windows\DataCollection" /v ConnectedUserExperiencesAndTelemetry /t REG_DWORD /d 1 /f

:: 不显示反馈通知
reg add "HKCU\Software\Microsoft\Siuf\Rules" /v NumberOfSIUFInPeriod /t REG_DWORD /d 0 /f

echo 用户控制设置已配置成功!
pause