# Installing Office 2016 through Ansible?

**URL:** <https://forum.ansible.com/t/installing-office-2016-through-ansible/29964>\
**Category:** Ansible Project\
**Created:** [March 23, 2019, 1:43am UTC](https://forum.ansible.com/t/installing-office-2016-through-ansible/29964 "2019-03-23T01:43:50Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tuyen\_Nguyen](https://avatars.discourse-cdn.com/v4/letter/t/3ab097/32.png) [@Tuyen\_Nguyen](https://forum.ansible.com/u/Tuyen_Nguyen)\
**Post date:** [March 23, 2019, 1:43am UTC](https://forum.ansible.com/t/installing-office-2016-through-ansible/29964/1 "2019-03-23T01:43:50Z")

</div>

Hi

I created a playbook to install Office 2016 which I think should work. I had it run setup.exe /adminfile \<unattended.msp file\> – the unattended.msp file I created by running setup.exe /setup and setting it to install with Display level: None, which has Suppress Modal selected only.

Each time I try running it, it keeps errorring out with a return code of 30066. Has anyone seen this issue before and how do we get around this error?

---

<div class="post-metadata">

**Author:** ![daemenseth](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/daemenseth/32/677_2.png) [@daemenseth](https://forum.ansible.com/u/daemenseth)\
**Post date:** [March 23, 2019, 11:47am UTC](https://forum.ansible.com/t/installing-office-2016-through-ansible/29964/2 "2019-03-23T11:47:34Z")

</div>

Can you post your playbook here?

---

<div class="post-metadata">

**Author:** ![Tuyen\_Nguyen](https://avatars.discourse-cdn.com/v4/letter/t/3ab097/32.png) [@Tuyen\_Nguyen](https://forum.ansible.com/u/Tuyen_Nguyen)\
**Post date:** [March 25, 2019, 1:52am UTC](https://forum.ansible.com/t/installing-office-2016-through-ansible/29964/3 "2019-03-25T01:52:00Z")

</div>

Hi

The task part of the playbook is:

- name: Install Office 2016 64-bit  
win\_package:  
path: ‘c:\temp\Office2016\office2016-64\setup.exe’  
product\_id: ‘{90160000-0012-0000-1000-0000000FF1CE}’  
arguments: ‘/adminfile unattended.MSP’

Before this task, I have another task that copied the distribution files for Office 2016 64 bit install to that c:\temp\Office2016\office2016-64\ directory already. The unattended.MSP is basically created with the Display level set to none with Suppress Modal selected only.

---

<div class="post-metadata">

**Author:** ![Tuyen\_Nguyen](https://avatars.discourse-cdn.com/v4/letter/t/3ab097/32.png) [@Tuyen\_Nguyen](https://forum.ansible.com/u/Tuyen_Nguyen)\
**Post date:** [March 25, 2019, 3:54am UTC](https://forum.ansible.com/t/installing-office-2016-through-ansible/29964/4 "2019-03-25T03:54:38Z")

</div>

Actually, I figured it out.

I was trying to install Office 2016 on a base Windows 7 64-bit machine.

There is a log of the install found in …\AppData\Local\Temp\SetupExe().txt and in that log I was able to find that it was failing due to a prerequisite check for KB2999226 hotfix. I will have my Office 2016 playbook install this hotfix first before attempting to install now.
