# Ansible not installing msi through shared drive

**URL:** <https://forum.ansible.com/t/ansible-not-installing-msi-through-shared-drive/34134>\
**Category:** Ansible Project\
**Tags:** windows\
**Created:** [October 30, 2020, 9:28pm UTC](https://forum.ansible.com/t/ansible-not-installing-msi-through-shared-drive/34134 "2020-10-30T21:28:37Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![smart\_aquarius](https://avatars.discourse-cdn.com/v4/letter/s/87869e/32.png) [@smart\_aquarius](https://forum.ansible.com/u/smart_aquarius)\
**Post date:** [October 30, 2020, 9:28pm UTC](https://forum.ansible.com/t/ansible-not-installing-msi-through-shared-drive/34134/1 "2020-10-30T21:28:37Z")

</div>

Team,

My ansible version is 2.9.1. Here I’m trying to install a msi, placed in a shared drive, on windows 10 VDI.

These are 2 play books I’ve tried

---

<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:** [November 2, 2020, 8:09pm UTC](https://forum.ansible.com/t/ansible-not-installing-msi-through-shared-drive/34134/2 "2020-11-02T20:09:11Z")

</div>

A few things

- Each task is run in a completely separate shell from each other, running net use in a previous task won’t have any affect on any subsequent tasks

- Don’t try to use mapped drives with Ansible, or really any other non-interactive purpose

- name: Install MSI  
win\_package:  
path: \xxxx\tttt\ppp\Application.msi  
state: present  
become: yes  
become\_method: runas  
become\_flags: logon\_type=new\_credentials logon\_flags=netcredentials\_only  
vars:  
ansible\_become\_user: domain\user  
ansible\_become\_pass: pass

We cover more about become and WIndows at [https://docs.ansible.com/ansible/latest/user\_guide/become.html#become-and-windows](https://docs.ansible.com/ansible/latest/user_guide/become.html#become-and-windows) but what that task basically does is to run your installer using the connection user but any outbound network attempts will use those credentials, just like net use would do.
