This project provides a robust solution to permanently disable autofocus on Logitech Brio cameras and force them to Manual Focus (Infinity). It solves the issue where the camera resets to Autofocus after a reboot or device restart.
- Dual Enforcement: Uses both Windows Registry settings (
LVFocusMode,FocusMode) and DirectShow commands to force the camera into Manual Focus mode. - Persistence: Installs a Windows Scheduled Task that runs at System Startup and User Logon to ensure settings are always applied.
- Device Reset: Automatically restarts the camera driver to ensure settings take effect immediately.
- System-Wide: Installs to
C:\ProgramDataand runs as theSYSTEMaccount, making it independent of specific user sessions.
Setup.ps1: The main installer. Run this to set everything up.Uninstall.ps1: Removes the scheduled task and installed files.Set-BrioManualFocus.ps1: The core logic script.Set-BrioFocusDirectShow.ps1: A helper script that uses DirectShow (C#) to send focus commands.
- Download the project files to a folder on your computer.
- Open PowerShell as Administrator.
- Navigate to the folder:
cd "C:\Path\To\BrioAntiAutoFocus" - Run the Setup Script:
This will:
.\Setup.ps1
- Create
C:\ProgramData\BrioAntiAutoFocusand copy the scripts there. - Apply the manual focus settings immediately (your camera will restart briefly).
- Register the "BrioManualFocus" Scheduled Task.
- Create
To remove the solution:
- Open PowerShell as Administrator.
- Run:
.\Uninstall.ps1
- Logs: The script logs its activity to:
Get-Content "C:\ProgramData\BrioAntiAutoFocus\BrioFocusLog.txt"
- Task Scheduler: You can find the task named "BrioManualFocus" in the Windows Task Scheduler.
- Manual Run: You can manually trigger the installed script at any time by running:
& "C:\ProgramData\BrioAntiAutoFocus\Set-BrioManualFocus.ps1"
To change the manual focus distance (default is 0/Infinity), edit the $Focus value in Set-BrioManualFocus.ps1 before running Setup, or edit the installed file at C:\ProgramData\BrioAntiAutoFocus\Set-BrioManualFocus.ps1.