cosine83

Check for Lync and install if not present

Jan 5th, 2014
144
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. $Arch = Get-WmiObject -Class Win32_Processor | Select AddressWidth
  2. $32 = test-path "C:\Program Files\Microsoft Office\Office15\lync.exe"
  3. $64 = test-path "C:\Program Files (x86)\Microsoft Office\Office15\lync.exe"
  4. $Install = "\\afs01v\Software\Lync_2013\x86\setup.exe"
  5.  
  6.  
  7. if (($Arch.AddressWidth -eq "32") -and ($32 -eq $true))
  8.     {
  9.         Write-Output "Lync 2013 is already installed, continuing logon. Please wait..."
  10.     }
  11. elseif (($Arch.AddressWidth -eq "64") -and ($64 -eq $true))
  12.     {
  13.         Write-Output "Lync 2013 is already installed, continuing logon. Please wait..."
  14.     }
  15. else
  16.     {
  17.         Write-Output "Lync 2013 is not installed, silently installing. Please wait..."
  18.         & $Install
  19.     }
Advertisement
Add Comment
Please, Sign In to add comment