# Win\_package hangs

**URL:** <https://forum.ansible.com/t/win-package-hangs/6786>\
**Category:** Get Help\
**Tags:** winrm, windows\
**Created:** [June 26, 2024, 3:29pm UTC](https://forum.ansible.com/t/win-package-hangs/6786 "2024-06-26T15:29:23Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![tlemons](https://avatars.discourse-cdn.com/v4/letter/t/edb3f5/32.png) [@tlemons](https://forum.ansible.com/u/tlemons)\
**Post date:** [June 26, 2024, 3:29pm UTC](https://forum.ansible.com/t/win-package-hangs/6786/1 "2024-06-26T15:29:23Z")

</div>

Hi - I’m trying to use the Ansible win\_package module to install “Visual C++ Redistributable Packages for Visual Studio 2013” on a Windows Server 2022 system. The win\_package execution does not produce an error, but it hangs.

Here is my task code:

```auto
- name: "Install Visual C++ Redistributable Packages for Visual Studio 2013"
  ansible.windows.win_package:
    path: c:\temp\vcredist_x64.exe
  become: true
  become_method: runas
  become_user: "administrator"

```

After seeing the hang behavior initially, I read in [Using Ansible and Windows — Ansible Community Documentation](https://docs.ansible.com/ansible/latest/os_guide/windows_usage.html) the suggestion to use ‘become’ for one issue, so I thought I’d try it for my issue, too. There was no change in behavior

I let it run for over an hour but did not see any output to ansible-playbook (run with -vvv) beyond:

TASK [install-exchange : Install Visual C++ Redistributable Packages for Visual Studio 2013] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
task path: /root/ecdm-ansible/ansible/roles/install-exchange/tasks/main.yml:294  
Using module file /root/.ansible/collections/ansible\_collections/ansible/windows/plugins/modules/win\_package.ps1  
Pipelining is enabled.  
\<[myhost.com](http://myhost.com)\> ESTABLISH WINRM CONNECTION FOR USER: lab\Administrator on PORT 5985 TO [myhost.com](http://myhost.com)  
EXEC (via pipeline wrapper)

Other Ansible modules run earlier in the playbook completed successfully, so I know that the basic authentication and execution machinery is functional.

I’m using:

ansible-galaxy collection list ansible.windows

# /root/.ansible/collections/ansible\_collections

Collection Version

* * *

ansible.windows 2.4.0

# /usr/lib/python3.10/site-packages/ansible\_collections

Collection Version

* * *

ansible.windows 1.14.0  
b57a80c06ac8:~ #

Thoughts, please! Thanks!

---

<div class="post-metadata">

**Author:** ![markuman](https://avatars.discourse-cdn.com/v4/letter/m/7bcc69/32.png) [@markuman](https://forum.ansible.com/u/markuman)\
**Post date:** [June 28, 2024, 11:39am UTC](https://forum.ansible.com/t/win-package-hangs/6786/2 "2024-06-28T11:39:16Z")

</div>

In the windows world. you often need parameters to process a silent unattended installation.  
And it heavly depend on the installer type

- nsis for example [silent-install.net](https://silent-install.net/installer/nullsoft_scriptable_install_system_nsis)

One way to figure it out is to install it once using cmd or powershell to determine th arguments.

For example if you want to install fireox, you need to do

```yml
    - name: install firefox
      ansible.windows.win_package:
        url_timeout: 120
        path: "https://download-installer.cdn.mozilla.net/pub/firefox/releases/{{ VERSION }}/win64/de/Firefox%20Setup%20{{ VERSION }}.exe"
        arguments:
          - -ms
      register: firefox_installation

```

and for fluent-bit, you’ll do

```yml
- name: install fluent-bit
  ansible.windows.win_package:
    path: C:\somedir\fluent-bit-{{ FBVERSION }}.exe
    validate_certs: false
    url_timeout: 120
    arguments:
      - /S
      - /D=C:\somedir
    wait_for_children: true

```

---

<div class="post-metadata">

**Author:** ![tlemons](https://avatars.discourse-cdn.com/v4/letter/t/edb3f5/32.png) [@tlemons](https://forum.ansible.com/u/tlemons)\
**Post date:** [July 3, 2024, 6:03pm UTC](https://forum.ansible.com/t/win-package-hangs/6786/3 "2024-07-03T18:03:27Z")

</div>

Excellent! Thanks very much for this information. @markuman !
