Skip to content

Commit

Permalink
Merge pull request #4 from syserr0r/patch-1
Browse files Browse the repository at this point in the history
Various fixes
  • Loading branch information
Gobidev authored Apr 23, 2023
2 parents 3d2ef4a + fa865de commit fe7c0a2
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions install.bat
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ if '%errorlevel%' NEQ '0' (
CD /D "%~dp0"

:: install vbs script to %UserProfile%
echo CreateObject("Wscript.Shell").Run "PowerShell.exe ""$Process = Get-Process audiodg; $Process.ProcessorAffinity=1; $Process.PriorityClass=""""""High""""""""", 0, True > %UserProfile%\set-audiodg-affinity.vbs
echo CreateObject("Wscript.Shell").Run "PowerShell.exe ""$Process = Get-Process audiodg; $Process.ProcessorAffinity=1; $Process.PriorityClass=""""""High""""""""", 0, True > "%UserProfile%\set-audiodg-affinity.vbs"
:: Affinity table
::Core # = Value = BitMask
::Core 1 = 1 = 00000001
Expand All @@ -34,14 +34,14 @@ echo CreateObject("Wscript.Shell").Run "PowerShell.exe ""$Process = Get-Process
::Core 8 = 128 = 10000000

:: remove old version of program if present
cd C:\Users\%username%\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup\
cd "C:\Users\%username%\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup\"
del set-audiodg-affinity.bat 2>NUL

:: add task scheduler job
schtasks /create /sc ONLOGON /tn audiodg-affinity /delay 0000:20 /tr %UserProfile%\set-audiodg-affinity.vbs /rl HIGHEST
schtasks /create /sc ONLOGON /tn audiodg-affinity /delay 0000:20 /tr "%UserProfile%\set-audiodg-affinity.vbs" /rl HIGHEST

:: run vbs script once to set the affinity for current session
%UserProfile%\set-audiodg-affinity.vbs
wscript "%UserProfile%\set-audiodg-affinity.vbs"

:: Uninstall with
:: schtasks /delete /f /tn audiodg-affinity
Expand Down

0 comments on commit fe7c0a2

Please sign in to comment.