# Anybody got win\_package to install something from a network share?

**URL:** <https://forum.ansible.com/t/anybody-got-win-package-to-install-something-from-a-network-share/44493>\
**Category:** Get Help\
**Tags:** windows\
**Created:** [September 15, 2025, 8:41pm UTC](https://forum.ansible.com/t/anybody-got-win-package-to-install-something-from-a-network-share/44493 "2025-09-15T20:41:11Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![ghowell64](https://avatars.discourse-cdn.com/v4/letter/g/ec9cab/32.png) [@ghowell64](https://forum.ansible.com/u/ghowell64)\
**Post date:** [September 15, 2025, 8:41pm UTC](https://forum.ansible.com/t/anybody-got-win-package-to-install-something-from-a-network-share/44493/1 "2025-09-15T20:41:11Z")

</div>

I’m attempting to use win\_package to install some software on windows managed hosts and I can’t get it to work if I specify the .exe from a network share. My ansible version is 2.18.9. The documentation is confusing because it mentions parameters which apparently aren’t supported anymore - like username or user\_name. The only examples they have for a network share install are those. For example, I try something like this:

```auto
    - name: Install using win_package
      ansible.windows.win_package:
        path: \\tsi-nas\Approved_Software\Everyone\Notepad++\64bit\npp.8.6.4.Installer.x64.exe
        product_id: notepad++
        arguments: /S
        state: present
        user_name: TRIDSYS\greg
      become: true
      become_method: runas
      become_user: greg

```

As you can see because of user\_name, I am on a domain network. I have set up my connection with kerberos and can successfully connect and ping with win\_ping. I was hoping to have an option like user\_name to be able to specify the user for the second hop authentication. The response I get is as follows:

```auto
fatal: [DEVOPS-GH-VM.tridsys.com]: FAILED! => {
    "changed": false,
    "invocation": {
        "module_args": {
            "arguments": "/S",
            "path": "\\\\tsi-nas\\Approved_Software\\Everyone\\Notepad++\\64bit\\npp.8.6.4.Installer.x64.exe",
            "product_id": "notepad++",
            "state": "present",
            "user_name": "TRIDSYS\\greg"
        }
    },
    "msg": "Unsupported parameters for (ansible.windows.win_package) module: user_name. Supported parameters include: validate_certs, use_proxy, proxy_password, arguments, checksum, force_basic_auth, http_agent, headers, expected_return_code, creates_path, proxy_use_default_credential, wait_for_children, proxy_url, log_path, url_timeout, url_username, maximum_redirection, use_default_credential, client_cert, state, proxy_username, follow_redirects, creates_service, url_password, url_method, product_id, checksum_algorithm, creates_version, chdir, client_cert_password, path, provider"
}

```

Most of those supported parameters mentioned aren’t shown in the documentation for win\_package. I’ve searched around for more recent documentation and/or examples of someone recent that has gotten this to work and I am coming up empty handed.

I’ve also tried to use win\_copy to get the installer from the network share over to a local drive where I could use win\_package but I run into the same problem with win\_copy. Again the documentation doesn’t show how to deal with the 2nd hop authentication.

However, I can successfully get this to work if I use win\_powershell instead, but that doesn’t give me the flexibility to make sure a specific version of the software is installed. The following DOES work for me:

```auto
            - name: Install notepad++
              ansible.windows.win_powershell:
                script: |
                  \\tsi-nas\Approved_Software\Everyone\Notepad++\64bit\npp.8.6.4.Installer.x64.exe /S
              become: true
              become_method: runas
              become_user: greg

```

Can someone tell me if there is a proven way to get this to work with more recent versions of ansible?

Thanks.

---

<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:** [September 15, 2025, 9:40pm UTC](https://forum.ansible.com/t/anybody-got-win-package-to-install-something-from-a-network-share/44493/2 "2025-09-15T21:40:23Z")

</div>

> [@ghowell64](#):
>
> `Unsupported parameters for (ansible.windows.win_package) module: user_name`

Please read the error message, it is saying the option `user_name` is not valid. Remove this option and it’ll move on.

As for the become you may be able to get it working by not specifying a password but that will only work if `greg` is logged on interactively when the task runs. To ensure the become method has a credential to delegate to the network share make sure you specify the become password through the var `ansible_become_password` or start Ansible with the correct become argument.

```yaml
    - name: Install using win_package
      ansible.windows.win_package:
        path: \\tsi-nas\Approved_Software\Everyone\Notepad++\64bit\npp.8.6.4.Installer.x64.exe
        product_id: notepad++
        arguments: /S
        state: present
      become: true
      become_method: runas
      vars:
        ansible_become_user: greg
        ansible_become_pass: ...

```

---

<div class="post-metadata">

**Author:** ![shertel](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/shertel/32/1241_2.png) [@shertel](https://forum.ansible.com/u/shertel)\
**Post date:** [September 15, 2025, 10:05pm UTC](https://forum.ansible.com/t/anybody-got-win-package-to-install-something-from-a-network-share/44493/3 "2025-09-15T22:05:05Z")

</div>

> [@ghowell64](#):
>
> The documentation is confusing because it mentions parameters which apparently aren’t supported anymore - like username or user\_name.

Sounds like you’re using old documentation, somehow. Use `ansible-doc ansible.windows.win_package` or [ansible.windows.win\_package module – Installs/uninstalls an installable package — Ansible Community Documentation](https://docs.ansible.com/ansible/latest/collections/ansible/windows/win_package_module.html).

---

<div class="post-metadata">

**Author:** ![ghowell64](https://avatars.discourse-cdn.com/v4/letter/g/ec9cab/32.png) [@ghowell64](https://forum.ansible.com/u/ghowell64)\
**Post date:** [September 16, 2025, 3:00pm UTC](https://forum.ansible.com/t/anybody-got-win-package-to-install-something-from-a-network-share/44493/4 "2025-09-16T15:00:08Z")

</div>

Thank you for the reply Jordan. Yes, I knew it was unsupported and I have tried without but couldn’t get past the “unauthorized” errors and was struggling to find the right syntax that would work. I tried what you suggested and it DOES work now so thank you very much. I swear I tried that before but I think it was when I was using NTLM instead of Kerberos. Since I switched to Kerberos, maybe the credential delegation was what I needed for that 2nd hop?? Either way, I’m glad it works. I’m still a little confused on “become” though because I read somewhere that become is the windows user that you become to run the command - i.e. becoming admin user to have privilege to install something, but for a network share access, it could be a different user that needs to authenticate. So the question I would have is that if the windows admin user is a different user than what is needed to authenticate for the network share, then how would you do that?

---

<div class="post-metadata">

**Author:** ![ghowell64](https://avatars.discourse-cdn.com/v4/letter/g/ec9cab/32.png) [@ghowell64](https://forum.ansible.com/u/ghowell64)\
**Post date:** [September 16, 2025, 3:01pm UTC](https://forum.ansible.com/t/anybody-got-win-package-to-install-something-from-a-network-share/44493/5 "2025-09-16T15:01:57Z")

</div>

Shertel, you are correct about the version. I look back through my tabs on my browser and for some reason when I was viewing the documentation for win\_package, it is looking at an ansible 2.9 version of that documentation. I have no idea how I got there and how the others are the most recent versions. I should have looked up. Anyway, I see the correct version now. Thank you. And thanks for the ansible-doc command. I will remember that for the future.
