TONYSO

Tonyso Credo: "Look for a pattern, and solve it for everything"

How Community Content is Supposed to Work

How Community Content is Supposed to Work

  • Comments 1
  • Likes

There is something interesting going on WRT "community content" at Microsoft. See the example over in Official Scripting Guys forum:

A customer asked for scripting help to check the OS version on his XP client machine and install patches.

The next day an MVP posted a script to help him:

1 Set objShell = CreateObject("WScript.Shell")  

2 Set objFSO = CreateObject("Scripting.FileSystemObject")  

3

4 strComputer = "."

5 Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")  

6 Set colItems = objWMIService.ExecQuery("SELECT * FROM Win32_OperatingSystem WHERE Name LIKE '%Microsoft Windows XP%'")  

7 For Each objItem In colItems  

8 If objItem.CSDVersion = "Service Pack 3" Then

9 If CheckPatch("KB953760")=True then  

10          Wscript.Echo "Patch found."

11 Else

12           Wscript.Echo "Patch not found. Installing patch..."

13           objShell.Run "\\server\share\WindowsXP-kb953760-x86-ENU.exe /qn", ,TRUE  

14 End if  

15 End If

16 Next

17

18 Function CheckPatch(patch)  

19 Set objSession = CreateObject("Microsoft.Update.Session")  

20 Set objSearcher = objSession.CreateUpdateSearcher  

21 Set objResults = objSearcher.Search("Type='Software'")  

22 Set colUpdates = objResults.Updates  

23   Found = False

24   Result = 0  

25 For i = 0 to colUpdates.Count - 1  

26       Result = Instr(colUpdates.Item(i).Title, patch)  

27 If Result > 0 then  

28          Found = True

29 Exit For

30 End if  

31 Next

32   CheckPatch = Found  

33 End Function

Kudos to Salvador Manaois III, aboren and nckmrtn for helping out the original poster.

What can we do to make more this this happen? Leave comments.

Comments
  • I'm not sure, but it sure needs to happen.  Your request for guest posts on Hyper-V didn't yield too much (except from me).  I had serious problems finding configs for my HDS SAN and WS08 clustering and also found little information on NIC teaming and Hyper-V.  I have since posted in newsgroups answers to my own questions on these subjects.

    I think the rule should be that if you ask a question on a newsgroup and then find the answer or fix it yourself that you should be obliged to post the answer you found or worked out to all the places that you posted the question to.

    That being said, I once had aspirations to be an MVP and was told the best way to get noticed was to lurk on the forums and answer people's questions.  I did this for a while, but then found I was spending a couple of hours per day on it and just ran out of puff.

    I think this is a "hard" problem.

    Cheers,

    Jeremy Hagan.

Your comment has been posted.   Close
Thank you, your comment requires moderation so it may take a while to appear.   Close
Leave a Comment