Microsoft Windows Vista Community Forums - Vistaheads
Recommended Download



Welcome to the Microsoft Windows Vista Community Forums - Vistaheads, YOUR Largest Resource for Windows Vista related information.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so , join our community today!

If you have any problems with the registration process or your account login, please contact us.

Driver Scanner

Scripting API: Find High Priority updates only

microsoft.public.windowsupdate






Speedup My PC
Reply
  #1 (permalink)  
Old 09-17-2009
Tonne
 

Posts: n/a
Scripting API: Find High Priority updates only
Im trying to detect pending hugh priority updates using the API:
Set objSearcher = CreateObject("Microsoft.Update.Searcher")
Set objResults = objSearcher.Search("Type='Software' and IsInstalled=0")
Set colUpdates = objResults.Updates

count = 0
titles = ""
For i = 0 to colUpdates.Count - 1
If colUpdates.Item(i).MsrcSeverity = "Critical" Or
colUpdates.Item(i).MsrcSeverity = "Important" Then
count = count + 1
titles = titles & vbCRLF & colUpdates.Item(i).Title
End If
Next

If Count > 0 Then
Wscript.Echo count & " pending updates:" & titles
Wscript.Quit 2
Else
Wscript.Echo "No pending updates"
Wscript.Quit 0
End If

--
But MsrcSeverity only indicates security risc and I cannot find any other
property that is helpful.

Is it possible?
Tonne
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 09-17-2009
PA Bear [MS MVP]
 

Posts: n/a
Re: Scripting API: Find High Priority updates only
[Crossposted & Followup set to WSUS newsgroup]

Start here: http://msdn.microsoft.com/en-us/libr...99(VS.85).aspx

PS: Ur spiel chukkers broke


Tonne wrote:
> Im trying to detect pending hugh priority updates using the API:
> Set objSearcher = CreateObject("Microsoft.Update.Searcher")
> Set objResults = objSearcher.Search("Type='Software' and
> IsInstalled=0")
> Set colUpdates = objResults.Updates
>
> count = 0
> titles = ""
> For i = 0 to colUpdates.Count - 1
> If colUpdates.Item(i).MsrcSeverity = "Critical" Or
> colUpdates.Item(i).MsrcSeverity = "Important" Then
> count = count + 1
> titles = titles & vbCRLF & colUpdates.Item(i).Title
> End If
> Next
>
> If Count > 0 Then
> Wscript.Echo count & " pending updates:" & titles
> Wscript.Quit 2
> Else
> Wscript.Echo "No pending updates"
> Wscript.Quit 0
> End If
>
> But MsrcSeverity only indicates security risc and I cannot find any other
> property that is helpful.
>
> Is it possible?


Reply With Quote
  #3 (permalink)  
Old 09-17-2009
Tonne
 

Posts: n/a
Re: Scripting API: Find High Priority updates only
Been there. I believe I have read all topics but to no avail.
--
Tonne


"PA Bear [MS MVP]" wrote:

> [Crossposted & Followup set to WSUS newsgroup]
>
> Start here: http://msdn.microsoft.com/en-us/libr...99(VS.85).aspx
>
> PS: Ur spiel chukkers broke
>
>
> Tonne wrote:
> > Im trying to detect pending hugh priority updates using the API:
> > Set objSearcher = CreateObject("Microsoft.Update.Searcher")
> > Set objResults = objSearcher.Search("Type='Software' and
> > IsInstalled=0")
> > Set colUpdates = objResults.Updates
> >
> > count = 0
> > titles = ""
> > For i = 0 to colUpdates.Count - 1
> > If colUpdates.Item(i).MsrcSeverity = "Critical" Or
> > colUpdates.Item(i).MsrcSeverity = "Important" Then
> > count = count + 1
> > titles = titles & vbCRLF & colUpdates.Item(i).Title
> > End If
> > Next
> >
> > If Count > 0 Then
> > Wscript.Echo count & " pending updates:" & titles
> > Wscript.Quit 2
> > Else
> > Wscript.Echo "No pending updates"
> > Wscript.Quit 0
> > End If
> >
> > But MsrcSeverity only indicates security risc and I cannot find any other
> > property that is helpful.
> >
> > Is it possible?

>
>

Reply With Quote
  #4 (permalink)  
Old 09-17-2009
Lawrence Garvin [MVP]
 

Posts: n/a
Re: Scripting API: Find High Priority updates only
"Tonne" <Tonne@discussions.microsoft.com> wrote in message
news:7FA83ED0-5C89-4938-B135-A5EAEBA71965@microsoft.com...

>> Tonne wrote:
>> > Im trying to detect pending hugh priority updates using the API:
>> > Set objSearcher = CreateObject("Microsoft.Update.Searcher")
>> > Set objResults = objSearcher.Search("Type='Software' and
>> > IsInstalled=0")
>> > Set colUpdates = objResults.Updates
>> >
>> > count = 0
>> > titles = ""
>> > For i = 0 to colUpdates.Count - 1
>> > If colUpdates.Item(i).MsrcSeverity = "Critical" Or
>> > colUpdates.Item(i).MsrcSeverity = "Important" Then
>> > count = count + 1
>> > titles = titles & vbCRLF & colUpdates.Item(i).Title
>> > End If
>> > Next
>> >
>> > If Count > 0 Then
>> > Wscript.Echo count & " pending updates:" & titles
>> > Wscript.Quit 2
>> > Else
>> > Wscript.Echo "No pending updates"
>> > Wscript.Quit 0
>> > End If
>> >
>> > But MsrcSeverity only indicates security risc and I cannot find any
>> > other
>> > property that is helpful.
>> >
>> > Is it possible?


>> Start here: http://msdn.microsoft.com/en-us/libr...99(VS.85).aspx


> Been there. I believe I have read all topics but to no avail.
> --
> Tonne


I believe the challenge revolves around the concept of "HighPriority"
updates.. and this concept is really unique to the WU/MU environment and is
designed to target the consumer's state of mind. This is really a
presentation value that makes a distinction between "HighPriority" which is
offered by default to all AU/WU/MU clients, and "Important", which is really
a classification for optional updates - but Microsoft doesn't want to really
use the word Optional, or else the update will be completely ignored. At
least by calling them "Important", some consumer will look at them and try
to make an informed decision.

Within the catalog metadata, though, what you'll want to extract to get the
equivalent of "HighPriority" updates is done by Update Classification. In
general, "HighPriority" includes all SecurityUpdates, all CriticalUpdates,
and *some* UpdateRollups or Updates classifications. Unfortunately, a
specific definition of the terms "HighPriority" and "Important" (or
"Optional") is hard to come by.

To that end, though, in a corporate/organizational setting, you probably do
want to script your tool against the Update Classification, including all
Security Updates (or maybe Security Updates that are only Critical and
Important) and Critical Updates (which contains bug fixes for defects that
can affect system stability or product functionality).


--
Lawrence Garvin, M.S., MCITP:EA, MCDBA
Principal/CTO, Onsite Technology Solutions, Houston, Texas
Microsoft MVP - Software Distribution (2005-2009)

My Blog: http://onsitechsolutions.spaces.live.com
Microsoft WSUS Website: http://www.microsoft.com/wsus
My MVP Profile: http://mvp.support.microsoft.com/pro...awrence.Garvin

Reply With Quote
  #5 (permalink)  
Old 09-17-2009
PA Bear [MS MVP]
 

Posts: n/a
Re: Scripting API: Find High Priority updates only
[So much for the web-interface server honoring Followup To settings...]

Tonne wrote:
> Been there. I believe I have read all topics but to no avail.
>
>> [Crossposted & Followup set to WSUS newsgroup]
>>
>> Start here: http://msdn.microsoft.com/en-us/libr...99(VS.85).aspx
>>
>> PS: Ur spiel chukkers broke
>>
>>
>> Tonne wrote:
>>> Im trying to detect pending hugh priority updates using the API:
>>> Set objSearcher = CreateObject("Microsoft.Update.Searcher")
>>> Set objResults = objSearcher.Search("Type='Software' and
>>> IsInstalled=0")
>>> Set colUpdates = objResults.Updates
>>>
>>> count = 0
>>> titles = ""
>>> For i = 0 to colUpdates.Count - 1
>>> If colUpdates.Item(i).MsrcSeverity = "Critical" Or
>>> colUpdates.Item(i).MsrcSeverity = "Important" Then
>>> count = count + 1
>>> titles = titles & vbCRLF & colUpdates.Item(i).Title
>>> End If
>>> Next
>>>
>>> If Count > 0 Then
>>> Wscript.Echo count & " pending updates:" & titles
>>> Wscript.Quit 2
>>> Else
>>> Wscript.Echo "No pending updates"
>>> Wscript.Quit 0
>>> End If
>>>
>>> But MsrcSeverity only indicates security risc and I cannot find any
>>> other
>>> property that is helpful.
>>>
>>> Is it possible?


Reply With Quote
  #6 (permalink)  
Old 09-18-2009
Tonne
 

Posts: n/a
Re: Scripting API: Find High Priority updates only
Thank you!

My revised script:
<job>
<script language="VBScript">
' check this category for 'High Priority' updates
category = "UpdateClassification"
highpriority = ",Security Updates,Update Rollups,Critical Updates,"

' create instance of update.searcher (offline)
Set objSearcher = CreateObject("Microsoft.Update.Searcher")
objSearcher.Online = 1

' find and fetch collection of updates
Set objResults = objSearcher.Search("Type='Software' and IsInstalled=0")
Set colUpdates = objResults.Updates

count = 0
titles = ""
For i = 0 to colUpdates.Count - 1
' check categories
Set colCategories = colUpdates.Item(i).Categories
For c = 0 to colCategories.Count - 1
If colCategories.item(c).Type = category _
And InStr(highPriority, "," & colCategories.item(c).Name & ",") > 0
Then
count = count + 1
titles = titles & vbCRLF & colUpdates.Item(i).Title
End If
Next
Next

If count > 0 Then
Wscript.Echo count & " pending updates:" & titles
Wscript.Quit 2
Else
Wscript.Echo "No pending updates"
Wscript.Quit 0
End If
</script>
</job>

--
Henrik Tonnesen
attentive as


"Lawrence Garvin [MVP]" wrote:

> "Tonne" <Tonne@discussions.microsoft.com> wrote in message
> news:7FA83ED0-5C89-4938-B135-A5EAEBA71965@microsoft.com...
>
> >> Tonne wrote:
> >> > Im trying to detect pending hugh priority updates using the API:
> >> > Set objSearcher = CreateObject("Microsoft.Update.Searcher")
> >> > Set objResults = objSearcher.Search("Type='Software' and
> >> > IsInstalled=0")
> >> > Set colUpdates = objResults.Updates
> >> >
> >> > count = 0
> >> > titles = ""
> >> > For i = 0 to colUpdates.Count - 1
> >> > If colUpdates.Item(i).MsrcSeverity = "Critical" Or
> >> > colUpdates.Item(i).MsrcSeverity = "Important" Then
> >> > count = count + 1
> >> > titles = titles & vbCRLF & colUpdates.Item(i).Title
> >> > End If
> >> > Next
> >> >
> >> > If Count > 0 Then
> >> > Wscript.Echo count & " pending updates:" & titles
> >> > Wscript.Quit 2
> >> > Else
> >> > Wscript.Echo "No pending updates"
> >> > Wscript.Quit 0
> >> > End If
> >> >
> >> > But MsrcSeverity only indicates security risc and I cannot find any
> >> > other
> >> > property that is helpful.
> >> >
> >> > Is it possible?

>
> >> Start here: http://msdn.microsoft.com/en-us/libr...99(VS.85).aspx

>
> > Been there. I believe I have read all topics but to no avail.
> > --
> > Tonne

>
> I believe the challenge revolves around the concept of "HighPriority"
> updates.. and this concept is really unique to the WU/MU environment and is
> designed to target the consumer's state of mind. This is really a
> presentation value that makes a distinction between "HighPriority" which is
> offered by default to all AU/WU/MU clients, and "Important", which is really
> a classification for optional updates - but Microsoft doesn't want to really
> use the word Optional, or else the update will be completely ignored. At
> least by calling them "Important", some consumer will look at them and try
> to make an informed decision.
>
> Within the catalog metadata, though, what you'll want to extract to get the
> equivalent of "HighPriority" updates is done by Update Classification. In
> general, "HighPriority" includes all SecurityUpdates, all CriticalUpdates,
> and *some* UpdateRollups or Updates classifications. Unfortunately, a
> specific definition of the terms "HighPriority" and "Important" (or
> "Optional") is hard to come by.
>
> To that end, though, in a corporate/organizational setting, you probably do
> want to script your tool against the Update Classification, including all
> Security Updates (or maybe Security Updates that are only Critical and
> Important) and Critical Updates (which contains bug fixes for defects that
> can affect system stability or product functionality).
>
>
> --
> Lawrence Garvin, M.S., MCITP:EA, MCDBA
> Principal/CTO, Onsite Technology Solutions, Houston, Texas
> Microsoft MVP - Software Distribution (2005-2009)
>
> My Blog: http://onsitechsolutions.spaces.live.com
> Microsoft WSUS Website: http://www.microsoft.com/wsus
> My MVP Profile: http://mvp.support.microsoft.com/pro...awrence.Garvin
>

Reply With Quote
  #7 (permalink)  
Old 09-22-2009
gnhs2n
 

Posts: n/a
Re: Scripting API: Find High Priority updates only
You can do the same with WuInstall (V1.2) on the command line (http://
www.wuinstall.com):

WuInstall /search /classification SCR

However, i am not sure if this is sufficient to find all High Priority
Updates ... there is also an update severity (Critical, Important,
Moderate, Low)
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
High Priority Updates Not Installing Chuck Dreier microsoft.public.windowsupdate 10 12-31-2009 22:39
High-priority Updates - are they the same as ciritcal updates Timboi microsoft.public.windowsupdate 2 03-05-2009 17:11
can't install 100+ high priority updates lx microsoft.public.windowsupdate 12 11-20-2008 21:48
High-Priority Updates malopr microsoft.public.windowsupdate 5 04-17-2008 15:30
High priority updates, failed error code0x80131700 mark microsoft.public.windowsupdate 2 12-10-2007 03:41




All times are GMT +1. The time now is 22:46.




Driver Scanner - Free Scan Now

Vistaheads.com is part of the Heads Network. See also XPHeads.com , Win7Heads.com and Win8Heads.com.


Design by Vjacheslav Trushkin for phpBBStyles.com.
Powered by vBulletin® Version 3.6.7
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.6.0 RC 2

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120