Is it possible to shut off the microphone and camera via regedit?

0

I'm attempting to shut down the microphone and camera on Windows 10. I'm trying to automate this process after loading the OS. I attempt to use Disable-PnpDevice in powershell but that does nothing. Unfortunately I am not at liberty to use Devcon. I thought maybe I'd write a .reg file where I basically just set the value for the audio endpoint and camera to "Deny" but I really have no idea how to do this. Can someone point me in the right direction? Thanks a lot.

Psyllex

Posted 2018-07-27T00:32:16.510

Reputation: 113

Do you mean to disable them completely? – Jamie Hanrahan – 2018-07-27T00:59:49.233

When you say "automate", it isn't clear whether you need to do a one-time shut-off on a large number of machines, or create a simple ability to shut-off as needed (repetitive) on your own machine. Can you clarify? Also, I would think that once Windows is loaded, it's too late to affect that session by changing the registry., so what you're trying to do isn't clear. – fixer1234 – 2018-07-27T05:11:35.983

Yes one-time shut off. Registry is the answer I believe. – Psyllex – 2018-07-27T18:14:59.583

Answers

1

Use MS SysInternals procmon, and run while making change to the settings using the Windows UI. Search the output for the regekys / strings that were changed and used that in you script for other target systems as needed.

Secondly, if this is your personal machine, why not get and use devcon, if it an enterprise environment, OK, I've seen where it is not allowed.

postanote

Posted 2018-07-27T00:32:16.510

Reputation: 1 783

Yes about an hour after I aksed this question that's similar to what I did. I search the registry for the microphone. Found it, disabled it. Then exported the reg file. Now I just have to throw it into my ansible script and I should be alright provided I can find a way to get around the "Confirmation" prompts.

(and yes this is for enterprise so Devcon isn't an option) – Psyllex – 2018-07-27T18:14:23.793

Is the ConfirmPreferences not working for you? Meaning '-Confirm:$false' – postanote – 2018-07-27T19:23:30.140

I haven't actually gave the ansible script a shot yet. But yes, that was my intent to use Confirm: $false. I don't know if it works on double confirmations which I believe registry settings require, but don't quote me on that. – Psyllex – 2018-07-28T17:39:09.093

Understood. I hate to suggest the SendKeys approach, but that too may be an option dealing with multiple confirmations. The issue with sendkeys, it that timing those keystroke sends can be a challenge from machine to machine. Well, that and the work needed to capture the right window/dialog to hit. – postanote – 2018-07-30T18:21:02.257