@echo off IF EXIST "%PROGRAMFILES(X86)%" (GOTO Install64) ELSE (GOTO Install32) :Install64 echo Adding registry key to disable MicTray64.exe... REG ADD "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\MicTray64.exe" /v "debugger" /t REG_SZ /d "devenv /debugexe" GOTO END :Install32 echo Adding registry key to disable MicTray.exe... REG ADD "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\MicTray.exe" /v "debugger" /t REG_SZ /d "devenv /debugexe" GOTO END :END echo Success! timeout 20