Merge 7a583ef8d2 into 9064a66938
This commit is contained in:
commit
ec885359be
1 changed files with 30 additions and 15 deletions
|
|
@ -82,18 +82,18 @@
|
|||
** As well as added support for dynamic deadline retrieval for software updates **
|
||||
** Stuff has been rewritten to suit my understanding and thoughts of the script **
|
||||
|
||||
2.0.0 - Huge changes to how this script handles custom protocols
|
||||
Added Support for Custom Actions/Protocols within the script under user context removing the need for that to be run under SYSTEM/ADMIN
|
||||
- <Option Name="Action" Value="ToastRunUpdateID:" />
|
||||
- <Option Name="Action" Value="ToastRunPackageID:" />
|
||||
- <Option Name="Action" Value="ToastRunApplicationID:" />
|
||||
- <Option Name="Action" Value="ToastReboot:" />
|
||||
Added Support to dynamically create Custom Action Scripts to support Custom Protocols
|
||||
Added Support for Software (Feature) Updates : Searches for an update and will store in variable
|
||||
Added new XML Types for Software Updates:
|
||||
- <Option Name="RunUpdateID" Enabled="True" Value="3012973" />
|
||||
- <Option Name="RunUpdateTitle" Enabled="True" Value="Version 1909" />
|
||||
Added support for getting deadline date/time dynamically for software updates
|
||||
2.0.0 - Huge changes to how this script handles custom protocols
|
||||
Added Support for Custom Actions/Protocols within the script under user context removing the need for that to be run under SYSTEM/ADMIN
|
||||
- <Option Name="Action" Value="ToastRunUpdateID:" />
|
||||
- <Option Name="Action" Value="ToastRunPackageID:" />
|
||||
- <Option Name="Action" Value="ToastRunApplicationID:" />
|
||||
- <Option Name="Action" Value="ToastReboot:" />
|
||||
Added Support to dynamically create Custom Action Scripts to support Custom Protocols
|
||||
Added Support for Software (Feature) Updates : Searches for an update and will store in variable
|
||||
Added new XML Types for Software Updates:
|
||||
- <Option Name="RunUpdateID" Enabled="True" Value="3012973" />
|
||||
- <Option Name="RunUpdateTitle" Enabled="True" Value="Version 1909" />
|
||||
Added support for getting deadline date/time dynamically for software updates
|
||||
- Configure DynamicDeadline with the UpdateID
|
||||
|
||||
2.0.1 - Updated custom action scripts!
|
||||
|
|
@ -106,7 +106,7 @@
|
|||
- If newer version is available from the script, new custom action scripts will be created
|
||||
- This allows me to make sure the relevant scripts are in place in case I change something along the way
|
||||
- Modified script output of custom script for RunPackageID to pick up Program ID dynamically
|
||||
Added support for getting deadline date/time dynamically for applications
|
||||
Added support for getting deadline date/time dynamically for applications
|
||||
- Configure DynamicDeadline with the Application ID
|
||||
|
||||
2.0.2 - Fixed an error in the custom protocols
|
||||
|
|
@ -946,7 +946,7 @@ exit 0
|
|||
}
|
||||
try {
|
||||
$GetCustomScriptPath = $PathInfo.FullName
|
||||
[String]$Script = 'shutdown /r /t 0 /d p:0:0 /c "Toast Notification Reboot"'
|
||||
[String]$Script = 'USOClient.exe RestartDevice ResumeUpdate && shutdown.exe /r /t 0 /d p:0:0 /c "Toast Notification Reboot"'
|
||||
if (-NOT[string]::IsNullOrEmpty($Script)) {
|
||||
Out-File -FilePath $GetCustomScriptPath -InputObject $Script -Encoding ASCII -Force
|
||||
}
|
||||
|
|
@ -2552,6 +2552,21 @@ else {
|
|||
Write-Log -Level Warn -Message "Conditions for displaying toast notification for ADPasswordExpiration are not fulfilled"
|
||||
}
|
||||
|
||||
# Toast used for Application installation
|
||||
if ($RunApplicationIDValue -and $RunApplicationIDEnabled -eq "True") {
|
||||
$TestApplicationID = Get-CimInstance -ClassName CCM_Application -Namespace ROOT\ccm\ClientSDK -ErrorAction SilentlyContinue | Where-Object { $_.Id -eq $RunApplicationIDValue }
|
||||
|
||||
if ($TestApplicationID -and $TestApplicationID.InstallState -eq "Installed") {
|
||||
Write-Log -Message "Application $RunApplicationIDValue is already installed. Toast notification won't be displayed"
|
||||
}
|
||||
else {
|
||||
Write-Log -Message "Application $RunApplicationIDValue is not installed. Displaying toast notification"
|
||||
Display-ToastNotification
|
||||
}
|
||||
# Stopping script. No need to accidently run further toasts
|
||||
break
|
||||
}
|
||||
|
||||
# Toast not used for either OS upgrade or Pending reboot OR ADPasswordExpiration. Run this if all features are set to false in config.xml
|
||||
if (($UpgradeOS -ne "True") -AND ($PendingRebootCheck -ne "True") -AND ($PendingRebootUptime -ne "True") -AND ($ADPasswordExpiration -ne "True")) {
|
||||
Write-Log -Message "Toast notification is not used in regards to OS upgrade OR Pending Reboots OR ADPasswordExpiration. Displaying default toast"
|
||||
|
|
@ -2562,4 +2577,4 @@ if (($UpgradeOS -ne "True") -AND ($PendingRebootCheck -ne "True") -AND ($Pending
|
|||
else {
|
||||
Write-Log -Level Warn -Message "Conditions for displaying default toast notification are not fulfilled"
|
||||
}
|
||||
#endregion
|
||||
#endregion
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue