Lately, Ive been working on a solution how to block installations when users are presenting anything on Skype/Lync. And its all possible with PowerShell isnt it?
So this solution will cancel the installation, with no user interaction.
Let’s start with the requirements.
Knowledge how Powershell app Deployment toolkit works
Skype/Lync 2013, 2016. Could work with older and higher, let me know if it works with other versions.
- First Download the App Deployment toolkit on the website here or if you have your App Deployment toolkit already, with some customizations already
https://github.com/PSAppDeployToolkit/PSAppDeployToolkit/releases - Extract it, and copy it to your working directory. Maybe on a Test client first.
- Ok, Now we need some Skype/Lync .DLL files, to see if the user is presenting or not. Download the lyncdll.zip and extract it
lyncdll.zip - Put these files into the SupportFiles Folder
- Now we need a script that checks for the presentation is running.
Download the Test-lyncpresentation and extract it.
Test-Lyncpresentation.zip - Put this script also in the SupportFiles Folder
- Now we need to add a function to our script. So we gonna replace this file AppDeployToolkit\AppDeployToolkitExtensions.ps1″ with a new one.
If you have some functions before, be sure to also copy them into the new file.
Download the appdeploytoolkitextensions.zip and extract it
appdeploytoolkitextensions.zip - Put the AppDeployToolkitExtensions.ps1 into the AppdeployToolkit folder and replace the file.
- Now we need to edit the Deploy-Application.ps1 file, Go to the steps just after “Pre-Installation” add these rows
$testlyncpresentation = test-lyncpresentation
if ($testlyncpresentation -eq “$true”
{
[boolean]$configShowBalloonNotification = $false
Exit-Script -ExitCode “60124”
} - If you don’t want to do all these steps, I’ve uploaded a working Ap
Deployment Toolkit for you guys, You can find it here
toolkit-with-skype-block.zip - DONE!
When you guys have done all these steps, you can just work as you always do on the app deployment toolkit. Good luck!
/Pontus