Deploying Lync 2010 Client as with Batch file

There are two versions of the Lync 2010 client, one for x86 and one for x64.  My understanding is that the client itself is 32bit but a number of the pre-requisits (silverlight & c++ reditributible) are arhitecture specific.  If you run the wrong version you will get an error message.

If you are sure all your machines have already met all the pre-requisits you can simply take the msi file from a machine which has already had the lync client installed and deploy that in the usual way.  (By default it is here: C:\Program Files (x86)\OCSetup\lync.msi)

But for most environments we cant be sure all the machines have met the pre-reqs and it may not be possible to just run one of the versions as you may have a mixed environment of x86 and x64.  This was the case for my environment and I ended up deploying the client with the following script configured as a computer start up script.  (if your users have admin rights you can run this as a logon script, but they dont have admin rights do they?)

If Exist %systemroot%\%computername%.txt goto END
If Exist “C:\Program Files (x86)\” goto X64
Set ARCHITECTURE=x86
IF NOT EXIST “%USERPROFILE%\Lync_Client\X86? MKDIR “%USERPROFILE%\Lync_Client\X86?
pushd “\\domain.com\staff\Installs\Lync\x86\”
XCOPY “*.exe” “%USERPROFILE%\Lync_Client\X86? /I /Y /Q
“%UserProfile%\Lync_Client\%ARCHITECTURE%\LyncSetup.exe” /install /silent /fulluisuppression
Echo “Lync client Successfully installed” on %COMPUTERNAME% >\\domain.com\staff\Installs\Lync\Lync_Client_Deployment_Results\%computername%.txt
Echo “Lync client Successfully installed” on %COMPUTERNAME% > %systemroot%\%Computername%.txt
:X64
If NOT EXIST “C:\Program Files (x86)\” goto END
Set ARCHITECTURE=x64
IF NOT EXIST “%USERPROFILE%\Lync_Client\X64? MKDIR “%USERPROFILE%\Lync_Client\X64?
pushd “\\domain.com\staff\Installs\Lync\x64\”
XCOPY “*.exe” “%USERPROFILE%\Lync_Client\X64? /I /Y /Q
“%UserProfile%\Lync_Client\%ARCHITECTURE%\LyncSetup.exe” /install /silent /fulluisuppression
Echo “Lync and Office clients Successfully installed” on %COMPUTERNAME% >”\\domain.com\staff\Installs\Lync\Lync_Client_Deployment_Results\%Computername%.txt”
Echo “Lync and Office clients Successfully installed” on %COMPUTERNAME% > %systemroot%\%Computername%.txt
:END
EXIT

As mentioned earlier, you can then deploy this script via Group Policy or your favorite deployment mechanism.  Note that the Lync installer must be run as a user with rights to install software.  For this reason, it may be easier to install as a computer startup script.  I also reccomend you used a DFS share for all your scripts/policies as it allows you to change the servers behind the share without actually changing the share name and having to edit all your scripts/policies.

Make sure the user/computers accounts have permission to write to the Lync_Client_Deployment_Results folder and also make sure you have extracted the client and put the relevant x64 and x86 client installers into the correct folders. e.g. put the x64 installer in \\domain.com\staff\Installs\Lync\x64\ and the x86 installer in \\domain.com\staff\Installs\Lync\x86\