The Issue
Recently I was posed a question where a customer wanted their users to experience a more advanced or informative when software gets installed. They also required that data be saved so that users work are not affected.
Requirements: The Mimecast for Outlook add in had to be installed (This requires Outlook to close) but users should be clearly warned to save data and then re open Outlook after completion (or instruct user to re open).
The Investigation
Option 1: System Center Configuration Manager “Run another program first”.
My first attempt was to create a Powershell Pop Up and turn that into a package that could run using the ConfigMgr feature “Run another program first” to warn users to close Outlook and save data. This Pop up we had to specify the time it waits which means for slower machines it would not wait long enough and faster machines it waited too long. Although the worked to an extent, I was not yet satisfied with the end product.




PowerShell Code below:
#.\PopupTimer.ps1 -Mimecastlocation
param (
$MimecastLocation
)
#script for balloon notification
[void] [System.Reflection.Assembly]::LoadWithPartialName("System.Windows.Forms")
$objNotifyIcon = New-Object System.Windows.Forms.NotifyIcon
#script to pop up window
$wshell = New-Object -ComObject Wscript.Shell
$wshell.Popup("Mimecast needs to close Outlook to install the latest add in. Please save all your work. Outlook will close automatically in 5 minutes",0,"Done",0x1)
#wait for user to close outlook
Wait-Event -Timeout 300
#force outlook to close
Stop-Process -Name 'OUTLOOK'
#wait before mimecast install
Wait-Event -Timeout 30
#pop up balloon notification
$objNotifyIcon.Icon = ".\Mimecast_M_2015.ico"
$objNotifyIcon.BalloonTipIcon = "Info"
$objNotifyIcon.BalloonTipText = "Do Not Open OUTLOOK while Mimecast is installing"
$objNotifyIcon.BalloonTipTitle = "Install Mimecast Add-In"
$objNotifyIcon.Visible = $true
$objNotifyIcon.ShowBalloonTip(5)
#Run msi to install mimecast
Invoke-Command -ScriptBlock {cmd /c msiexec.exe /i ".\Mimecast_for_outlook_7_7_x64.msi" /qn}
#Balloon Pop up for completion
$objNotifyIcon.BalloonTipText = "You can now open OUTLOOK"
$objNotifyIcon.BalloonTipTitle = "Install Mimecast Add-In was successful"
$objNotifyIcon.Visible = $true
$objNotifyIcon.ShowBalloonTip(5)
#wait after mimecast install
Wait-Event -Timeout 30
#start up Outlook
Start-Process 'OUTLOOK'
Option 2: The PowerShell Application Deployment Toolkit (PSappDeployToolkit)
This neat little toolkit that can be downloaded from https://psappdeploytoolkit.com/ surpassed my expectations when it comes to capabilities, features and design. It has an amazing manual that I will be quoting for the sake of this post.
Extract the Package


Modify the PowerShell





Create the ConfigMgr Application (PSAppDeploymentToolkit Admin Guide)
Create the application






Deploying the application



The Resolution (User Experience)




Summary
- Download and extract the PSAppDeployToolkit from: https://psappdeploytoolkit.com/
- Modify the PowerShell
- Create the ConfigMgr Application
- Deploy to your customers
As always, I hope this has been informative and feel free to correct me in any steps.
You must log in to post a comment.