Created
April 27, 2024 19:09
-
-
Save Slingexe/792b894c9660a0d684fd95ab833cbb01 to your computer and use it in GitHub Desktop.
I got annoyed having to set audiodg's priority and affinity whenever I wanted to talk to someone without my mic shitting the bucket so I made this and left it in my startup folder
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
::################################################################################################################################# | |
:: Elevate this script # | |
::################################################################################################################################# | |
( | |
:: Check Admin rights and create VBS Script to elevate | |
>nul fsutil dirty query %SYSTEMDRIVE% 2>&1 || ( | |
:: Very little red console | |
mode con cols=80 lines=3 | |
color cf | |
:: Message | |
title Please wait... | |
echo. | |
echo Requesting elevated shell... | |
:: Create VBS script | |
echo Set UAC = CreateObject^("Shell.Application"^)>"%TEMP%\elevate.vbs" | |
echo UAC.ShellExecute "%~f0", "%TEMP%\elevate.vbs", "", "runas", 1 >>"%TEMP%\elevate.vbs" | |
if exist "%TEMP%\elevate.vbs" start /b /wait >nul cscript /nologo "%TEMP%\elevate.vbs" 2>&1 | |
:: Delete elevation script if exist | |
if exist "%TEMP%\elevate.vbs" >nul del /f "%TEMP%\elevate.vbs" 2>&1 | |
exit /b | |
) | |
) | |
pushd "%~dp0" | |
popd | |
:search-audiodg | |
tasklist|find "audiodg" | |
IF %ERRORLEVEL% == 0 GOTO :found-audiodg | |
TIMEOUT /T 1 | |
GOTO :search-audiodg | |
:found-audiodg | |
wmic process where name="audiodg.exe" CALL setpriority "high priority" | |
C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe "$Process = Get-Process audiodg; $Process.ProcessorAffinity=1" | |
echo Set audiodg.exe to high priority and 1 Affinity, Enjoy not havind a shit mic | |
echo Press any key to close window | |
pause |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment