# How to Changing Registry Settings with Ansible Windows 10

**URL:** <https://forum.inductiveautomation.com/t/how-to-changing-registry-settings-with-ansible-windows-10/19108>\
**Category:** General Discussion\
**Created:** [August 6, 2018, 12:19pm UTC](https://forum.inductiveautomation.com/t/how-to-changing-registry-settings-with-ansible-windows-10/19108 "2018-08-06T12:19:31Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![camillelola26](https://avatars.discourse-cdn.com/v4/letter/c/d26b3c/32.png) [@camillelola26](https://forum.inductiveautomation.com/u/camillelola26)\
**Post date:** [August 6, 2018, 12:19pm UTC](https://forum.inductiveautomation.com/t/how-to-changing-registry-settings-with-ansible-windows-10/19108/1 "2018-08-06T12:19:31Z")

</div>

I am working as an Automation Developer. I have been trying to disable a microphone via automation for a few days now. I’m using [Ansible](https://mindmajix.com/ansible-training) 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:

```auto
-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:

```auto
-name: disable mic
  win_regmerge:
    path: C:\path\to-my-working-reg-file

```

I get an Error accessing the registry. Am I just screwed and unable to run these registry changes. I am running as administrator. I’m not sure what else to do here. Any help would be appreciated. p.s. I have attempted using PowerShell with the reg file and it says it’s not a cmdlet. I have 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.

Thanks & Regards  
Camillelola

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [August 6, 2018, 1:15pm UTC](https://forum.inductiveautomation.com/t/how-to-changing-registry-settings-with-ansible-windows-10/19108/2 "2018-08-06T13:15:58Z")

</div>

You might have better luck on an ansible or Windows forum…

---

<div class="post-metadata">

**Author:** ![camillelola26](https://avatars.discourse-cdn.com/v4/letter/c/d26b3c/32.png) [@camillelola26](https://forum.inductiveautomation.com/u/camillelola26)\
**Post date:** [August 7, 2018, 4:00am UTC](https://forum.inductiveautomation.com/t/how-to-changing-registry-settings-with-ansible-windows-10/19108/3 "2018-08-07T04:00:50Z")

</div>

Okay…Thanks for your reply.
