# Alternative to win\_msi

**URL:** <https://forum.ansible.com/t/alternative-to-win-msi/24239>\
**Category:** Ansible Project\
**Tags:** windows\
**Created:** [April 18, 2017, 3:55pm UTC](https://forum.ansible.com/t/alternative-to-win-msi/24239 "2017-04-18T15:55:13Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tai\_Kedzierski](https://avatars.discourse-cdn.com/v4/letter/t/b77776/32.png) [@Tai\_Kedzierski](https://forum.ansible.com/u/Tai_Kedzierski)\
**Post date:** [April 18, 2017, 3:55pm UTC](https://forum.ansible.com/t/alternative-to-win-msi/24239/1 "2017-04-18T15:55:13Z")

</div>

Hello

I am wanting to start maintaining a group of Windows hosts that badly need orchestration. One task is to update Java (major version) on all of them

I have found the `win_msi` module , but scrolling down I find that it is listed as deprecated - not only that, but the further explanation seems to have been clipped (incomplete pargraph)

[http://docs.ansible.com/ansible/win\_msi\_module.html](http://docs.ansible.com/ansible/win_msi_module.html)

I note though that the main list does not list it as deprecated (not marked with “ **D:** ”)

[http://docs.ansible.com/ansible/list\_of\_windows\_modules.html](http://docs.ansible.com/ansible/list_of_windows_modules.html)

So my questions are:

- truly, is it deprecated and advised against?
- and if so, what is the new, recommended way to update Java on a bunch of Windows hosts ?

Thanking you

Tai

---

<div class="post-metadata">

**Author:** ![j.r.hawkesworth](https://avatars.discourse-cdn.com/v4/letter/j/a3d4f5/32.png) [@j.r.hawkesworth](https://forum.ansible.com/u/j.r.hawkesworth)\
**Post date:** [April 19, 2017, 7:46pm UTC](https://forum.ansible.com/t/alternative-to-win-msi/24239/2 "2017-04-19T19:46:23Z")

</div>

I would recommend using win\_package - that’s what I use to maintain java versions in our playbooks.

For info, recent java versions like to upgrade themselves. While this is laudable it may cause unexpected behaviours as clusters start running different java versions. So I would strongly recommend checking the command line options for the java installer you are using. Below are the command line arguments that we use on some systems:

arguments: INSTALL\_SILENT=1 AUTO\_UPDATE=0 WEB\_JAVA=0 WEB\_ANALYTICS=0 /s /L C:\ansible\log\java-installation.log

# added install options based on options here: [Installing the JDK and the JRE with a Configuration File](http://docs.oracle.com/javase/8/docs/technotes/guides/install/config.html#table_config_file_options)

Hope this helps,

Jon

---

<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:** [April 19, 2017, 8:49pm UTC](https://forum.ansible.com/t/alternative-to-win-msi/24239/3 "2017-04-19T20:49:17Z")

</div>

There were plans to deprecate win\_msi in the 2.3 release in favour of win\_package but win\_package was never hardened as a core module so it never became official. That being said win\_package is the recommended of the 2 but there have been a few cases where I still favour win\_msi over win\_package due to the temperamental requirement over whether you need to specify a product is for some packages or not.

---

<div class="post-metadata">

**Author:** ![Tai\_Kedzierski](https://avatars.discourse-cdn.com/v4/letter/t/b77776/32.png) [@Tai\_Kedzierski](https://forum.ansible.com/u/Tai_Kedzierski)\
**Post date:** [April 21, 2017, 2:55pm UTC](https://forum.ansible.com/t/alternative-to-win-msi/24239/4 "2017-04-21T14:55:37Z")

</div>

Thanks Jon

I’m inheriting these systems and not accustomed to Windows so the added notes are very welcome. I am surprised at the notion that systems set up with the same Java installer were to not remain generally in sync version-wise (or is this just a question of timing ?). But I guess that’s why we find the need to orchestrate!

---

<div class="post-metadata">

**Author:** ![Dag\_Wieers](https://avatars.discourse-cdn.com/v4/letter/d/45deac/32.png) [@Dag\_Wieers](https://forum.ansible.com/u/Dag_Wieers)\
**Post date:** [May 9, 2017, 12:45pm UTC](https://forum.ansible.com/t/alternative-to-win-msi/24239/5 "2017-05-09T12:45:49Z")

</div>

Yes, and for that reason I don't think we're quite ready to deprecate win\_msi for v2.4.

I know we really want to, but win\_package needs to be shipped with a release and working for all use-cases, before we can start deprecating win\_msi IMO.

Or you risk ending up with a broken alternative, and the deprecated option people were using.

---

<div class="post-metadata">

**Author:** ![Dag\_Wieers](https://avatars.discourse-cdn.com/v4/letter/d/45deac/32.png) [@Dag\_Wieers](https://forum.ansible.com/u/Dag_Wieers)\
**Post date:** [May 9, 2017, 12:59pm UTC](https://forum.ansible.com/t/alternative-to-win-msi/24239/6 "2017-05-09T12:59:56Z")

</div>

Jon,

I think that example deserves to be part of the win\_package documentation.

To draw the attention to a common issue, and to showcase using win\_package for Java installation, a common thing people tend to do 🙂

Examples like this greatly improves the user-experience of the documentation, and to a greater extent, Ansible.

Everyone else,

We do accept improvements to the documentation, so if you come across a nice solution with the potential of being a great example to others, feel free to edit the documentation (through the website, or GitHub). No prior knowledge of git or internal processes required.
