Tag Archives: ConfigMgr

Disable Client Popup Message for SCCM Task Sequences

By default an advertised Task Sequence in SCCM (Microsoft System Center Configuration Manager) will popup a message on the client workstation indicating that there is a new application that is available to be run. This is sometimes not desirable. By default it is possible to turn off notification for a regular Software Distribution Program in SCCM via the GUI by checking the box on the Program for “Suppress Program Notifications”. This GUI option is not available from a Task Sequence, but can manually be added via VBScript.

The value that we are adding to the ProgramFlags setting is 0x00000400 (which in decimal is 1024). You can find more details about the ProgramFlags from here.

Here’s the basic process:

1. Copy the following script to your SCCM server and save as “DisableTaskSequencePopupMessage.vbs”

‘Disable the popup message on a client workstation for a Task Sequence
‘Run this VBScript on your SCCM server
strSMSServer = “.”
‘Set COUNTDOWN value to 0x00000400 in HEX
COUNTDOWN = &H00000400

Set objLocator = CreateObject(“WbemScripting.SWbemLocator”)
Set objSCCM = objLocator.ConnectServer(strSMSServer, “root\sms”)
Set Providers = objSCCM.ExecQuery(“SELECT * From SMS_ProviderLocation WHERE ProviderForLocalSite = true”)
For Each Provider in Providers
If Provider.ProviderForLocalSite = True Then
Set objSCCM = objLocator.ConnectServer(Provider.Machine, “root\sms\site_” & Provider.SiteCode)
End If
Next
Set TaskSequencePackage = objSCCM.ExecQuery(“SELECT * FROM SMS_TaskSequencePackage”,,48)
For Each PackageID in TaskSequencePackage
PackageIDS = PackageIDS & VbCrLF & PackageID.PackageID & ” – ” & PackageID.Name
Next
Do
strTSID = InputBox(“Please enter the packageID that corresponds to your Task Sequence:” & vbCrLF & PackageIDS)
If strTSID = “” Then WScript.Quit ‘Detect Cancel
If strTSID <> “” Then Exit Do ‘Detect value strTSID.
‘MsgBox “You must enter a numeric value.”, 48, “Invalid Entry”
Loop
Set objProgram = objSCCM.Get(“SMS_TaskSequencePackage.PackageID='” & strTSID & “‘”)

OldProgramFlags = objProgram.ProgramFlags
ProgramFlags = objProgram.ProgramFlags
ProgramFlags = ProgramFlags OR COUNTDOWN
MsgBox “Flag for ” & strTSID & ” currently set to ” & OldProgramFlags & ” (HEX: 0x” & HEX(OldProgramFlags) & “)” & vbCrLF & vbCrLF & “Adding 0x00000400 (COUNTDOWN. The countdown dialog is not displayed)” & VBCrLF & vbCrLF & “Set flag to: ” & ProgramFlags & ” (HEX: 0x” & HEX(ProgramFlags) & “)”,,”SUCCESS!”
‘ see ConfigMgr SDK for details (“SMS_Program Server WMI Class”)
objProgram.ProgramFlags = ProgramFlags
objProgram.Put_

2. Run the VBscript. You’ll be prompted with a list of the Task Sequences. Type in the name of the task sequence you want to change (e.g. NYC000279) and hit OK.

3. You should see a response like the following:

—————————
SUCCESS!
—————————
Flag for NYC00279 currently set to 152084496 (HEX: 0x910A010)

Adding 0x00000400 (COUNTDOWN. The countdown dialog is not displayed)

Set flag to: 152085520 (HEX: 0x910A410)
—————————
OK
—————————

4. Then advertise the Task Sequence and the Task Sequence will not popup any messages on the client workstation.

5. NOTE: This version is improved in that it prompts you for the task sequence ID and also now “OR’s” the value together rather than just blindly adding 1024 to the value every time the script runs, so you can safely run this script multiple times without any issues on the same Task Sequence.

References:

Workaround to disable notification for task sequence?
Notifications for virtual packages