how to disable/enable audio device programmably?

Divyns Lin 41 Reputation points
2023-10-31T05:50:26.15+00:00

Hello MSFT

I attempted to create a simple program that allows enabling and disabling sound devices for testing APO loading and unloading easily.

Is there any programmatic way to achieve this? I tried with the 'pnputil.exe /restart' method, but it involves a reboot sometime, which is not ideal. I've searched MSDN, and there doesn't seem to be a direct method available. Can anyone provide some hints, whether it's through Win32, .NET, or PowerShell?

User's image

User's image

Windows development | Windows API - Win32
Windows for business | Windows Server | User experience | PowerShell
Developer technologies | .NET | Other
{count} votes

Accepted answer
  1. Castorix31 90,686 Reputation points
    2023-10-31T07:43:33.2266667+00:00

    With IPolicyConfig.SetEndpointVisibility

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.