Lync 2013 Silent or Unattended Install

Ah Mondays. The best day of the week! It’s the day that everyone comes to you with some new task or thing to do that you don’t ever, ever have time for. And yes, I know that I’m posting this on a Tuesday. Remember that whole thing about not having time?

So a co-worker came to me, asking for my scripting skills in creating a nice silent install package for Lync 2013. The official Lync 2013 package itself was pretty straightforward. Just like any other office product, the steps were, as follows:

– Download the Office product

– Get that thing extracted so you’ve got a nice directory structure like the following, underneath the folder referring to your platform architecture of choice. For example, the following resides underneath the “x86” directory once I’ve extracted the Lync client installer properly.

filetree– Now, open up a command line, navigate to the folder, and run ‘ setup.exe /admin’ This opens up a customization window where you can tell the installer all kinds of options. The ones we’re interested in are the following.

–  Install Location and Organization Name: I changed the Organization Name as desired

– Licensing and user interface: This is the important one! Enter a product key (if necessary) or leave the KMS option checked by default, as that’s likely what you, as a corporate user, are using. You’ll then want to check the box that says ‘ accept the terms in the License Agreement’ and then change the display level to ‘None.’ The Suppress modal should then be checked, and the other two options (completion notice and no cancel) should be unchecked. In fact, you can make it look like this:

licensing– Add registry entries: This is also pretty important. When the user runs Lync for the first time they’ll get a screen that asks them to configure Windows Update for the Lync application. It’s fine and dandy when it’s your own box, but not so awesome when you’re trying to deploy this to bunches of people. To eliminate the issue, add the following registry keys and rest easy (Note: These are REG_DWORD values)!

registryIt’s worth noting that those aren’t typos above, the key is really named ‘ShownFirstRunOptin’ Who comes up with these things, I’ll never know.

If you don’t put these in, your users get the following popup. Not good.


Boom. Save the admin file as a .msp, add it to the ‘Updates’ folder in your Lync install files directory, and run the following: setup.exe /adminfile "updates\<adminfile>"

Example: setup.exe /adminfile "updates\Lync2013-Rev1.msp"

So after a bit of waiting you’ve got Lync 2013 installed silently. Or, wait… what was that popup that showed up for just about a second when the installer started to run. It loudly exclaimed ‘Please wait while setup prepares the necessary files”. You know, this screen:

setupfilesIt is, as far as I can tell, impossible to turn off. If you have a user manually run your script, this thing will display. End of story. Ugh. The only good news? It doesn’t show up when you deploy via SCCM! Happy days.

So, now we’re all done! Lync 2013 for everyone! I thought my co-worker would be super excited now that I got it all done. Right? Wrong! I now had to package the Lync 2013 VDI plugin. Goodie.

If you’re unfamiliar with what this thing does, you can check out a nifty PDF that details it right here. So when I was provided the installation files for this bad boy I got the following:

installersOh. No. There are few things I hate more in life than someone giving me a random installer, especially a .exe, and telling me to package it. There could be anything inside! Anything! I started by trying to pass it the parameters that it seemed to ask for ‘/silent /passive /norestart’. This of course, did absolutely nothing.

As it turns out, the VDI installer is similar to the Lync Basic installer. It’s an executable that has the install files inside, which actually work like a normal Office install. Why they decided to distribute them in a .exe, I have no idea.

To extract, run lyncvdi32.exe /extract:<PATH TO EXTRACT> and watch the magic happen ( I usually use lyncvdi32.exe /extract:.\Lync2013\ to extract to a folder in the current directory)! It will extract the files and you’ll see a file tree magically appear just like what you saw with the original Lync 2013 setup files. If you happen to try to extract the .exe with another utility like 7Zip, the files won’t come out right and the admin wizard won’t run properly. You’ve been warned!

Then, just like before, run setup.exe /admin and configure the admin file like above. You’ll only need to touch the Organization Name and Licensing screens – no registry editing needed – and then apply that admin file to the Lync 2013 VDI setup.exe the same way.

Viola! Now you’ve got silent installs for the Lync 2013 full client, and the Lync 2013 VDI plugin. Enjoy!