[Commands]
Info=Disables telemetry, feedback prompts, and remote IntelliCode analysis for Visual Studio.
Check=reg query "HKLM\SOFTWARE\Wow6432Node\Microsoft\VSCommon\14.0\SQM" /v OptIn && reg query "HKLM\SOFTWARE\Wow6432Node\Microsoft\VSCommon\15.0\SQM" /v OptIn && reg query "HKLM\SOFTWARE\Wow6432Node\Microsoft\VSCommon\16.0\SQM" /v OptIn && reg query "HKLM\SOFTWARE\Wow6432Node\Microsoft\VSCommon\17.0\SQM" /v OptIn && reg query "HKLM\Software\Policies\Microsoft\VisualStudio\SQM" /v OptIn && reg query "HKCU\Software\Microsoft\VisualStudio\Telemetry" /v TurnOffSwitch && reg query "HKLM\SOFTWARE\Policies\Microsoft\VisualStudio\Feedback" /v DisableFeedbackDialog && reg query "HKLM\SOFTWARE\Policies\Microsoft\VisualStudio\Feedback" /v DisableEmailInput && reg query "HKLM\SOFTWARE\Policies\Microsoft\VisualStudio\Feedback" /v DisableScreenshotCapture && reg query "HKLM\SOFTWARE\Policies\Microsoft\VisualStudio\IntelliCode" /v DisableRemoteAnalysis && reg query "HKCU\SOFTWARE\Microsoft\VSCommon\16.0\IntelliCode" /v DisableRemoteAnalysis && reg query "HKCU\SOFTWARE\Microsoft\VSCommon\17.0\IntelliCode" /v DisableRemoteAnalysis
Do=reg add "HKLM\SOFTWARE\Wow6432Node\Microsoft\VSCommon\14.0\SQM" /v OptIn /t REG_DWORD /d 0 /f && reg add "HKLM\SOFTWARE\Wow6432Node\Microsoft\VSCommon\15.0\SQM" /v OptIn /t REG_DWORD /d 0 /f && reg add "HKLM\SOFTWARE\Wow6432Node\Microsoft\VSCommon\16.0\SQM" /v OptIn /t REG_DWORD /d 0 /f && reg add "HKLM\SOFTWARE\Wow6432Node\Microsoft\VSCommon\17.0\SQM" /v OptIn /t REG_DWORD /d 0 /f && reg add "HKLM\Software\Policies\Microsoft\VisualStudio\SQM" /v OptIn /t REG_DWORD /d 0 /f && reg add "HKCU\Software\Microsoft\VisualStudio\Telemetry" /v TurnOffSwitch /t REG_DWORD /d 1 /f && reg add "HKLM\SOFTWARE\Policies\Microsoft\VisualStudio\Feedback" /v DisableFeedbackDialog /t REG_DWORD /d 1 /f && reg add "HKLM\SOFTWARE\Policies\Microsoft\VisualStudio\Feedback" /v DisableEmailInput /t REG_DWORD /d 1 /f && reg add "HKLM\SOFTWARE\Policies\Microsoft\VisualStudio\Feedback" /v DisableScreenshotCapture /t REG_DWORD /d 1 /f && reg add "HKLM\SOFTWARE\Policies\Microsoft\VisualStudio\IntelliCode" /v DisableRemoteAnalysis /t REG_DWORD /d 1 /f && reg add "HKCU\SOFTWARE\Microsoft\VSCommon\16.0\IntelliCode" /v DisableRemoteAnalysis /t REG_DWORD /d 1 /f && reg add "HKCU\SOFTWARE\Microsoft\VSCommon\17.0\IntelliCode" /v DisableRemoteAnalysis /t REG_DWORD /d 1 /f
Undo=reg delete "HKLM\SOFTWARE\Wow6432Node\Microsoft\VSCommon\14.0\SQM" /v OptIn /f && reg delete "HKLM\SOFTWARE\Wow6432Node\Microsoft\VSCommon\15.0\SQM" /v OptIn /f && reg delete "HKLM\SOFTWARE\Wow6432Node\Microsoft\VSCommon\16.0\SQM" /v OptIn /f && reg delete "HKLM\SOFTWARE\Wow6432Node\Microsoft\VSCommon\17.0\SQM" /v OptIn /f && reg delete "HKLM\Software\Policies\Microsoft\VisualStudio\SQM" /v OptIn /f && reg delete "HKCU\Software\Microsoft\VisualStudio\Telemetry" /v TurnOffSwitch /f && reg delete "HKLM\SOFTWARE\Policies\Microsoft\VisualStudio\Feedback" /v DisableFeedbackDialog /f && reg delete "HKLM\SOFTWARE\Policies\Microsoft\VisualStudio\Feedback" /v DisableEmailInput /f && reg delete "HKLM\SOFTWARE\Policies\Microsoft\VisualStudio\Feedback" /v DisableScreenshotCapture /f && reg delete "HKLM\SOFTWARE\Policies\Microsoft\VisualStudio\IntelliCode" /v DisableRemoteAnalysis /f && reg delete "HKCU\SOFTWARE\Microsoft\VSCommon\16.0\IntelliCode" /v DisableRemoteAnalysis /f && reg delete "HKCU\SOFTWARE\Microsoft\VSCommon\17.0\IntelliCode" /v DisableRemoteAnalysis /f

[Expect]
OptIn=0x0
TurnOffSwitch=0x1
DisableFeedbackDialog=0x1
DisableEmailInput=0x1
DisableScreenshotCapture=0x1
DisableRemoteAnalysis=0x1