Unable to uninstall Notepad++ in Windows host

94 views
Skip to first unread message

Vikrant Kaushik

unread,
Nov 4, 2019, 1:12:56 PM11/4/19
to Ansible Project
I'm unable to uninstall notepad++ in the Windows host:

- name: uninstall notepad++
  win_package:
    path: '{{ notepadpp_install_dir }}\uninstall.exe'
    product_id: 'Notepad++*'
    arguments: /S
    state: present

- name: uninstall notepad++ 
win_command: powershell.exe -ExecutionPolicy ByPass -File D:\un.ps1
 args:
   stdin: get-package notepad++* | % { & $_.Meta.Attributes["UninstallString"] /S}

Every time I'm seeing the change but nothing happened on the host. can some please advise and help.

I'm using service account for this but able to install without any incident.
Reply all
Reply to author
Forward
0 new messages