#Importing SDK Dll
[string]$LyncModelDll = "C:\Program Files (x86)\Microsoft Lync\SDK\Assemblies\Desktop\Microsoft.Lync.Model.dll"
Import-Module -Name $LyncModelDll
START .\communicator.exe
#Get Lync Client State
$objLyncClient = [Microsoft.Lync.Model.LyncClient]::GetClient()
Write-Host = "State: " $objLyncClient.State
$objLyncClient.BeginInitialize($test,$null)
$objLyncClient.BeginSignIn($objLyncClient.Uri,$null,$null,$null,$null)
In the end I opted for an AutoIT script that starts Lync then hides the window and the taskbar icon.
;
; AutoIt Version: 3.0
; Language: English
; Platform: Win9x/NT
; Author: Trentent Tye (trententtye@hotmail.com)
;
; Script Function:
; Opens Lync in a hidden window and hides the tray icon.
;
#Include
Run("C:\Program Files (x86)\Microsoft Lync\communicator.exe", "", @SW_HIDE) ;
WinWaitActive("Microsoft Lync")
Opt("WinTitleMatchMode", 4)
Global $hTray = WinGetHandle("[CLASS:Shell_TrayWnd]")
Global $hToolbar = ControlGetHandle($hTray, "", "[CLASSNN:ToolbarWindow321]")
Global $iCnt = _GUICtrlToolbar_ButtonCount($hToolbar)
;MsgBox(0, "Debug" , "Debug: $iCnt = " & $iCnt)
Global $iCmdVolume = -1
Global $sMsg, $sText, $iCmd
For $n = 0 To $iCnt - 1
$sMsg = "Index: " & $n
$iCmd = _GUICtrlToolbar_IndexToCommand($hToolbar, $n)
$sMsg &= " CommandID: " & $iCmd
$sText = _GUICtrlToolbar_GetButtonText($hToolbar, $iCmd)
If StringInStr($sText, "Lync") Then $iCmdLync = $iCmd
$sMsg &= " Text: " & $sText
; MsgBox(0, "Debug" , $sMsg)
Next
;MsgBox(0, "Debug","Debug: $iCmdLync = " & $iCmdLync)
_GUICtrlToolbar_SetButtonState($hToolbar, $iCmdLync, $TBSTATE_HIDDEN)
3 comments:
Hi there, I am trying your autoit script for Lync 2013, however it is not hiding itself and I the script is not closing. I am running it on a TS server running 2008R2. What do I need to modify in the script?
Thanks for you help.
I have only used it against 2010. I'm not sure if it will work for 2013. Sorry.
ezTalks is the world's leading online video conferencing provider that enables you to connect with people anywhere and anytime. Integrated with HD video conferencing, audio conferencing, screen sharing, content sharing, remote control and other powerful features, it can be widely applied to all industries
join.me competitors
telecommuting advantages
open source meeting software
Post a Comment