Skip to content

Instantly share code, notes, and snippets.

@vaaski
Created April 10, 2024 16:44
Show Gist options
  • Select an option

  • Save vaaski/d65d1304ccdf6b661075457add07d004 to your computer and use it in GitHub Desktop.

Select an option

Save vaaski/d65d1304ccdf6b661075457add07d004 to your computer and use it in GitHub Desktop.
<?xml version="1.0" encoding="UTF-16"?>
<!-- replace DEVICE_NAME_REPLACE_ME in the <Subscription> tag -->
<!-- find the name in event viewer: Microsoft/Windows/Audio/Operational -->
<Task version="1.4" xmlns="http://schemas.microsoft.com/windows/2004/02/mit/task">
<RegistrationInfo>
<Author>vaaski</Author>
<Description></Description>
<URI>\restart voicemeeter on bluetooth connect</URI>
</RegistrationInfo>
<Triggers>
<EventTrigger>
<Enabled>true</Enabled>
<Subscription>&lt;QueryList&gt;&lt;Query Id="0" Path="Microsoft-Windows-Audio/Operational"&gt;&lt;Select Path="Microsoft-Windows-Audio/Operational"&gt;
*[EventData[Data[@Name='DeviceName'] and (Data='DEVICE_NAME_REPLACE_ME')]]
and
*[EventData[Data[@Name='NewState'] and (Data='1')]]
&lt;/Select&gt;&lt;/Query&gt;&lt;/QueryList&gt;</Subscription>
</EventTrigger>
</Triggers>
<Actions Context="Author">
<Exec>
<Command>"C:\Program Files (x86)\VB\Voicemeeter\voicemeeter8x64.exe"</Command>
<Arguments>-R</Arguments>
</Exec>
</Actions>
</Task>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment