I've been trying to disable a microphone via automation for a few days now. I'm using Ansible and attempting to change the registry setting. It's a simple thing changing from 10000000 to 10000001 or 128 to 129. I've attempted the following:
-name: disable mic win_regedit: path: HKLM:\path to registry name: DeviceState value: 129 (also have used data and type but none of that worked)
Here I get that I cannot access the registry. So I gave win_regmerge a shot:
-name: disable mic win_regmerge: path: C:\path\to-my-working-reg-file
Again on this I get a Error accessing the registry. Am I just screwed and unable to run these registry changes. I'm running as adminstrator. I'm not sure what else to do here. Any help would be appreciated. p.s. I've attempted using powershell with the reg file and it says it's not a cmdlet. I've made a batch file to run the reg file but it just spins as it's waiting for admin confirmation. when using powershell I can use -confirm: $false not an option with the bat file. The only other thing I could think of was to run a bat file, of a powershell file of the .reg file...but that's kind of ridiculous & probably won't work.