# Unexpected RC while uninstallaing a package using win\_package

**URL:** <https://forum.ansible.com/t/unexpected-rc-while-uninstallaing-a-package-using-win-package/30687>\
**Category:** Ansible Project\
**Created:** [June 29, 2019, 5:07pm UTC](https://forum.ansible.com/t/unexpected-rc-while-uninstallaing-a-package-using-win-package/30687 "2019-06-29T17:07:05Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![shyam.rpms](https://avatars.discourse-cdn.com/v4/letter/s/a88e57/32.png) [@shyam.rpms](https://forum.ansible.com/u/shyam.rpms)\
**Post date:** [June 29, 2019, 5:07pm UTC](https://forum.ansible.com/t/unexpected-rc-while-uninstallaing-a-package-using-win-package/30687/1 "2019-06-29T17:07:05Z")

</div>

Hi All,

Im trying to uninstall a package using win\_package but getting the following error, Playbook is able to remove the software from the server but at the end Im getting this error.

**“msg”: “unexpected rc from install G:\Program Files\IBM\cognos\tm1\_64\uninstall\uninst.exe: see rc, stdout, and stderr for more details”,**

“rc”: 2,

this is the playbook,

**- win\_package:**  
**arguments: “/S”**  
**path: “G:\Program Files\IBM\cognos\tm1\_64\uninstall\uninst.exe”**  
**product\_id: auto**

Thanks and Regards,

---

<div class="post-metadata">

**Author:** ![goforawalktwice](https://avatars.discourse-cdn.com/v4/letter/g/c5a1d2/32.png) [@goforawalktwice](https://forum.ansible.com/u/goforawalktwice)\
**Post date:** [June 30, 2019, 8:29pm UTC](https://forum.ansible.com/t/unexpected-rc-while-uninstallaing-a-package-using-win-package/30687/2 "2019-06-30T20:29:33Z")

</div>

Perhaps try running interactively directly on target machine. There should be a logging option somehow too

---

<div class="post-metadata">

**Author:** ![jborean](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/jborean/32/1525_2.png) [@jborean](https://forum.ansible.com/u/jborean)\
**Post date:** [June 30, 2019, 9:31pm UTC](https://forum.ansible.com/t/unexpected-rc-while-uninstallaing-a-package-using-win-package/30687/3 "2019-06-30T21:31:56Z")

</div>

We set the ‘stdout’ and ‘stderr’ return keys to what was returned when trying to run that executable. You should see what the values were for that to try and debug it futher. If nothing was returned on those keys then you need to look into Cognos and see what an rc of 2 means. This could be found in log files related to that application or some doc on IBM’s website. The value is typically application specific and not something we could really help you with.

Thanks

Jordan
