Monthly Archives: January 2015

Installing Lync Sucks, So I Fixed It.

There’s apparently a bug in certain Lync 2013 SP1 client install media, where if you put a custom MSP file in the Updates folder, the install gets all wonky and puts in all the shared components but Lync.exe never gets installed.

I didn’t like most of the solutions out there that I read about, and there’s other weirdness with the install so I made the script below and called it Install.cmd. In the same folder as the script, make a folder called SystemDrive, then Temp, then Lync. Put all the install files (setup.exe, the x86 and x64 folders, etc) there and don’t forget to create/place your config.xml file. Create your MSP with setup.exe and put it in the Lync folder – not in the x86\Updates folder. If you use the Cisco remote call stuff, put your addrccmenu.bat file in the Lync folder too and configure the server. If you don’t use that, remove that part of the script.

@ECHO OFF
ECHO Downloading install files…
XCOPY SYSTEMDRIVE %SYSTEMDRIVE%\ /E /Y >NUL
ECHO Download complete. Installying Lync…
START “Install Lync” /WAIT %SYSTEMDRIVE%\Temp\Lync\setup.exe /config %SYSTEMDRIVE%\Temp\Lync\x86\lync.ww\config.xml

ECHO Waiting for the Lync base install to complete…
:Loopstart
TIMEOUT /T 30
TASKLIST | FINDSTR msiexec.exe >NUL
IF %ERRORLEVEL%==0 GOTO :Loopstart

IF EXIST “%ProgramFiles%\Microsoft Office\Office15\lync.exe” SET Success=YES
IF EXIST “%ProgramFiles(x86)%\Microsoft Office\Office15\lync.exe” SET Success=YES
IF NOT DEFINED Success GOTO :Fail

ECHO Base install complete. Installing configuration pack…
START /WAIT Msiexec.exe /update %SYSTEMDRIVE%\Temp\Lync\config.msp
IF ERRORLEVEL 1 EXIT /B %ERRORLEVEL%

ECHO Configuration pack installed. Adding Cisco Remote Call Plugin….
%SYSTEMDRIVE%\Temp\Lync\addrccmenu.bat yourserverinfohere
IF ERRORLEVEL 1 GOTO :Fail

ECHO Install complete. Removing temporary files…
RMDIR /S /Q %SYSTEMDRIVE%\Temp\Lync
EXIT /B 0

:Fail
ECHO Install failed. Removing temporary files…
RMDIR /S /Q %SYSTEMDRIVE%\Temp\Lync
EXIT /B 1

Use this freely, just give credit where credit is due.