Jump to content


xstatic411

Disable New Program Notification for a Single Task Sequence

Recommended Posts

Ladies and Gentlemen,

 

I am in a quandary and am in need of some guidance.

 

We are in the process of deploying a post image task sequence to the "All Client Systems" and I am reluctant to pull the trigger due to the new program notification pop up that will come with it. I was suppressed all program notifications in my packages, remove any sort of reminders and count downs from my advert. However, I am still getting the new program pop up on the client machines. Any ideas on how to remove the pop up for just this specific task sequence advert?

 

I have figured out how to disable the pop ups using a global setting but want to make sure there are no other options prior to making such a broad change.

 

Let me know if more information is needed.

 

Thanks in advance

 

cb

 

Edit: The task sequence needs to be ran via Run Advertised Programs after the image is completed and the SCCM client has done its thing. We are using SCCM 2007.

Share this post


Link to post
Share on other sites

This VBScript should work for you. Just update the Site Code in the script to the site where you want to turn off the notifications. I think this needs to be run on each Primary Site. Run the script from cscript without any parameters to see what parameters are possible. (-all or [PackageID])

 

If WScript.Arguments.Count < 1 Then
 WScript.Echo "Usage:"
 WScript.Echo "    DisableTSNotification.vbs -all"
 WScript.Echo "    DisableTSNotification.vbs [PackageID]…"
 WScript.Quit
 End If 

Dim strComputer
 Dim siteCode
 Dim objWMIService
 Dim colItems
 Dim objItem
 Dim packageID
 Dim itemFound
 Dim numPackages
 Dim numUpdated 

strComputer = "."
siteCode="CM1"
 Set objWMIService = GetObject("winmgmts://" & strComputer & "/root/sms/site_" & siteCode) 

If StrComp(UCase(WScript.Arguments.Item(0)), "-ALL", 1) = 0 Then
 numPackages = 0
 numUpdated = 0
 Set colItems = objWMIService.ExecQuery("SELECT * FROM SMS_TaskSequencePackage", "WQL", 32)
 For Each objItem in colItems
 If (objItem.ProgramFlags AND 1024) = 0 Then
 objItem.ProgramFlags = objItem.ProgramFlags OR 1024
 objItem.Put_
 numUpdated = numUpdated + 1
 WScript.Echo "Modified package " & objItem.PackageID
 End If
 numPackages = numPackages + 1
 Next
 WScript.Echo "Updated " & numUpdated & " of " & numPackages & " packages"
 Else
 For Each packageID in WScript.Arguments
 Set colItems = objWMIService.ExecQuery("SELECT * FROM SMS_TaskSequencePackage WHERE PackageID='" & packageID & "'", "WQL", 32)
 itemFound = false
 For Each objItem in colItems
 If (objItem.ProgramFlags AND 1024) = 0 Then
 objItem.ProgramFlags = objItem.ProgramFlags OR 1024
 objItem.Put_
 WScript.Echo "Modified package " & objItem.PackageID
 Else
 WScript.Echo "No need to update package " & objItem.PackageID
 End If
 itemFound = true
 Next
 If itemFound = false Then
 WScript.Echo "ERROR: Task Sequence " & packageID & " was not found on this server"
 End If
 Next
 End If 

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...


×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.