# win\_nssm error (windows 7): Parameter "Application" is only valid for services managed by NSSM!

**URL:** <https://forum.ansible.com/t/win-nssm-error-windows-7-parameter-application-is-only-valid-for-services-managed-by-nssm/33453>\
**Category:** Ansible Project\
**Tags:** windows\
**Created:** [July 21, 2020, 2:31pm UTC](https://forum.ansible.com/t/win-nssm-error-windows-7-parameter-application-is-only-valid-for-services-managed-by-nssm/33453 "2020-07-21T14:31:48Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Deni\_Bertovic](https://avatars.discourse-cdn.com/v4/letter/d/4bbf92/32.png) [@Deni\_Bertovic](https://forum.ansible.com/u/Deni_Bertovic)\
**Post date:** [July 21, 2020, 2:31pm UTC](https://forum.ansible.com/t/win-nssm-error-windows-7-parameter-application-is-only-valid-for-services-managed-by-nssm/33453/1 "2020-07-21T14:31:48Z")

</div>

Hey there,

I hope that someone can shed some light on this since I’m not really a windows admin.

I have the following task:

- name: Create service via nssm  
win\_nssm:  
name: ‘{{ filebeat\_service\_name }}’  
application: ‘{{ filebeat\_home }}\filebeat.bat’  
state: present  
notify: Restart filebeat

And I get the following error, only on windows 7 (windows 10 works fine).  
Nssm was installed with the win\_chocolatey module and the only difference I was was that on the win10 host it was already there and on the win7 host I got a warning that it needed to be installed first (and the module did all that by itself).

fatal: [x.x.x.x]: FAILED! =\> {  
“changed”: false,  
“msg”: “Error retrieving Application for service "filebeat"”,  
“nssm\_error\_cmd”: “nssm.exe get filebeat Application”,  
“nssm\_error\_log”: “Parameter "Application" is only valid for services managed by NSSM!\r\r\n”  
}

Interestingly enough if I fiddle around with win\_service and try and create the service, then remove it manually, it works.

Any insight is appreciated.

-Deni
