À©µµ¿ì ½ºÅ©¸³Æ®·Î ƯÁ¤ ¾÷µ¥ÀÌÆ® ¼û±è ó¸® °ü·Ã ¹®ÀÇ

   Á¶È¸ 3717   Ãßõ 0    

 안녕하세요 금일 제가 속한 곳에서 KB4041681 (WINDOWS7 32BIT) 업데이트와 업무관련 시스템이 충돌을 일으키는 것을 확인하였습니다. 

PMS로 스크립트를 만들어 저 위 녀석을 삭제 후 사용안함으로 등록하려고 하는데요 

해외포럼에서 관련 글을 찾았으나 쉽게 적용이 되지 않아 고수님들의 도움을 구하고자 합니다. 

문제점 

실행시 커맨드창에서 wscript.exe hide2.vbs (administrator 로 실행함) 

실제로 출력을 하면 몇초 걸렸다라는 메시지 박스가 뜨게 되고 적용이 되었다 라고 나오지만 

윈도우 업데이트 숨겨진 업데이트 복원을 누르면 KB4041681이 적용되지 않은것으로 보입니다. 

출처 :  https://superuser.com/questions/722667/how-to-hide-updates-in-windows-updates-without-gui


코드

How to hide updates in Windows Updates without GUI - Super User                                                                                                                                                                                                                                                                       

<style>body,.top-bar{margin-top:1.9em}</style>

 

' Maxpsoft May 30, 2013, 9:34:15 PM
' 06/18/2013 Add extra for Bing Desktop v1.3
' 06/28/2013 Updated to continue searching as long as it is finding something otherwise Quit
'
' Original Mike.Moore Dec 17, 2012 on answers.microsoft but when ran it Hide everything so no good.
' Link to script: http://www.msfn.org/board/topic/163162-hide-bing-desktop-and-other-windows-updates/
' You may freely use this script as long as you copy it complete and it remains the same except for adjusting hideupdates.
' If I need to change something then let me know so all may benefit.

Dim WSHShell, StartTime, ElapsedTime, strUpdateName, strAllHidden
Dim Checkagain 'Find more keep going otherwise Quit

Dim hideupdates(3) 'TO ADD 1 EDIT THE (3) AND ADD another hideupdates(#)

hideupdates(0) = "KB2592687" 'Remote Desktop Protocol 8.0
hideupdates(1) = "KB2709981" 'Windows Media Player 12
hideupdates(2) = "Bing Desktop" 'With this we get all versions
hideupdates(3) = "KB4041681"

Set WSHShell = CreateObject("WScript.Shell")

StartTime = Timer 'Start the Timer

Set updateSession = CreateObject("Microsoft.Update.Session")
updateSession.ClientApplicationID = "MSDN Sample Script"
Set updateSearcher = updateSession.CreateUpdateSearcher()
Set searchResult = updateSearcher.Search("IsInstalled=0 and Type='Software' and IsHidden=0")

Checkagain = "True"

For K = 0 To 10 'Bing Desktop has 4, Silverlight has 5
If Checkagain = "True" Then
Checkagain = "False"
CheckUpdates
ParseUpdates
End if
Next

ElapsedTime = Timer - StartTime
strTitle = "Bing Desktop and Windows Updates Hidden."
strText = strAllHidden
strText = strText & vbCrLf & ""
strText = strText & vbCrLf & "Total Time " & ElapsedTime
intType = vbOkOnly

'Silent just comment these 2 lines with a ' and it will run and quit
Set objWshShell = WScript.CreateObject("WScript.Shell")
intResult = objWshShell.Popup(strText, ,strTitle, intType)

'Open Windows Update after remove the comment '
'WshShell.Run "%windir%\system32\control.exe /name Microsoft.WindowsUpdate"

Set objWshShell = nothing
Set WSHShell = Nothing
WScript.Quit


Function ParseUpdates 'cycle through updates
For I = 0 To searchResult.Updates.Count-1
Set update = searchResult.Updates.Item(I)
strUpdateName = update.Title
'WScript.Echo I + 1 & "> " & update.Title
For j = 0 To UBound(hideupdates)
if instr(1, strUpdateName, hideupdates(j), vbTextCompare) = 0 then
Else
strAllHidden = strAllHidden _
& vbcrlf & update.Title
update.IsHidden = True'
Checkagain = "True"
end if
Next
Next
End Function

Function CheckUpdates 'check for new updates cause Bing Desktop has 3
Set updateSession = CreateObject("Microsoft.Update.Session")
updateSession.ClientApplicationID = "MSDN Sample Script"
Set updateSearcher = updateSession.CreateUpdateSearcher()
Set searchResult = _
updateSearcher.Search("IsInstalled=0 and Type='Software' and IsHidden=0")
End Function
happy day
ªÀº±Û Àϼö·Ï ½ÅÁßÇÏ°Ô.


QnA
Á¦¸ñPage 1794/5678
2014-05   4940861   Á¤ÀºÁØ1
2015-12   1477712   ¹é¸Þ°¡
2012-09   5654   º´¸ÀÆù
2015-10   5023   Macstall
2017-11   3352   dongcheol
2014-06   4569   ¹Ì¿ì
2017-11   3510   ³ë°¡¸®°­Ãß
2023-03   1948   Çï·Î¿ì
2017-11   8889   ±è°Ç¿ì
2019-02   3585   À»Áö¹®´ö
2009-07   6039   Æí¿µ±¹
2016-10   3860   »ïµ¹±º
2023-03   1594   2CPUÃÖÁÖÈñ
2015-11   4755   ÆíÇѼ¼»ó
2016-10   4618   ŵ°íÀ×
2015-11   6386   dhdh2h
2009-08   9391   motion
2015-11   6776   ȸ¿øK
2017-12   3849   ±è°Ç¿ì
2009-08   8619   ÀÌÁ¾¿ø
2014-07   7969   ¾Ç¶¥
2016-10   5109   FreeBSD