# win\_regedit?

**URL:** <https://forum.ansible.com/t/win-regedit/18915>\
**Category:** Ansible Project\
**Tags:** windows\
**Created:** [August 1, 2015, 12:05pm UTC](https://forum.ansible.com/t/win-regedit/18915 "2015-08-01T12:05:34Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![O\_haya](https://avatars.discourse-cdn.com/v4/letter/o/ea666f/32.png) [@O\_haya](https://forum.ansible.com/u/O_haya)\
**Post date:** [August 1, 2015, 12:05pm UTC](https://forum.ansible.com/t/win-regedit/18915/1 "2015-08-01T12:05:34Z")

</div>

Hi,

I am trying to use Ansible to change Windows registry using win\_regedit. I have this .yml:

`

- name: Change app compatibility  
hosts: windows  
gather\_facts: false  
tasks:
- name: do regedit  
win\_regedit:  
key: ‘HKCU:\Software\Microsoft\Windows NT\CurrentVersion\AppCompatFlags’  
value: ‘{2b9034f3-b661-4d36-a5ef-60ab5a711ace}’  
data: 00000004  
datatype: dword

`

But when I run it I get:

`

[root@centos65 ansible\_test]# ansible-playbook doregedit.yml  
ERROR: win\_regedit is not a legal parameter in an Ansible task or handler

`

What is causing this error (and how to fix it)?

Do I have to do something additional to install the win\_regedit module because it’s an “extra”?

Thanks,  
Jim

---

<div class="post-metadata">

**Author:** ![esco\_real](https://avatars.discourse-cdn.com/v4/letter/e/c89c15/32.png) [@esco\_real](https://forum.ansible.com/u/esco_real)\
**Post date:** [August 2, 2015, 2:39pm UTC](https://forum.ansible.com/t/win-regedit/18915/2 "2015-08-02T14:39:51Z")

</div>

Hello Jim,

maybe you don’t use version 2 of Ansible?  
[http://docs.ansible.com/ansible/win\_regedit\_module.html](http://docs.ansible.com/ansible/win_regedit_module.html)  
“New in version 2.0.”

esco

---

<div class="post-metadata">

**Author:** ![O\_haya](https://avatars.discourse-cdn.com/v4/letter/o/ea666f/32.png) [@O\_haya](https://forum.ansible.com/u/O_haya)\
**Post date:** [August 2, 2015, 3:26pm UTC](https://forum.ansible.com/t/win-regedit/18915/3 "2015-08-02T15:26:01Z")

</div>

esco,

Oh. I just checked and I have 1.92, which is what I got from yum install.

Is the only way to get version 2 is to build from source then?

Thanks!

Jim

---

<div class="post-metadata">

**Author:** ![O\_haya](https://avatars.discourse-cdn.com/v4/letter/o/ea666f/32.png) [@O\_haya](https://forum.ansible.com/u/O_haya)\
**Post date:** [August 2, 2015, 4:30pm UTC](https://forum.ansible.com/t/win-regedit/18915/4 "2015-08-02T16:30:48Z")

</div>

Hi,

Now I remember why I didn’t install from source. I’ll post a new thread about this…

Jim
