Skip to content

Commit

Permalink
Merge pull request #11 from Maxwell-Calhoun/additional-recurring-task
Browse files Browse the repository at this point in the history
Additional task to run at set interval
  • Loading branch information
Gobidev committed Jun 17, 2024
2 parents 4c7c65e + 524851e commit b6a2fed
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
11 changes: 9 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,12 @@ every login and wrote a new script that makes use of that.
_Note: If you had v1 of the script installed, it is automatically uninstalled if
you install v2._

## New in v2.5

The affinity will now be set periodically in addition to only on login. For more
information, see
[#11](https://github.com/Gobidev/voicemeeter-auto-affinity/pull/11).

## How to Install

To install the script, download the `install.bat` file from the
Expand All @@ -26,11 +32,12 @@ and run it. That's it!

## How to Uninstall

If you no longer want the audiodg affinity to be set at login, run the following
command from an administrator command prompt:
To remove the Task Scheduler tasks, run the following commands from an
administrator command prompt:

```bat
schtasks /delete /f /tn audiodg-affinity
schtasks /delete /f /tn audiodg-affinity-recurring
```

## The Problem
Expand Down
3 changes: 3 additions & 0 deletions install.bat
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,9 @@ del set-audiodg-affinity.bat 2>NUL
:: add task scheduler job
schtasks /create /sc ONLOGON /tn audiodg-affinity /delay 0000:20 /tr "wscript \"%UserProfile%\set-audiodg-affinity.vbs\"" /rl HIGHEST

:: Creating scheduled task so it is more persistently applying changes as the process is controlled by the Windows Audio service and will stop and restart process as needed
schtasks /create /sc MINUTE /tn audiodg-affinity-recurring /mo 5 /tr "wscript \"%UserProfile%\set-audiodg-affinity.vbs\"" /rl HIGHEST

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

Expand Down

0 comments on commit b6a2fed

Please sign in to comment.