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

   Á¶È¸ 3721   Ãßõ 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 1796/5680
2014-05   4947327   Á¤ÀºÁØ1
2015-12   1483984   ¹é¸Þ°¡
2015-04   3914   ¼Ò³â½Ã´ë
2015-08   3914   linesis
2019-01   3915   ºÀ·¡
2014-11   3915   Psychophysi¡¦
2018-05   3915   ³ª¶ó»ç¶û
2020-09   3915   ¼Û»óº´
2015-04   3915   ½ÂÈĴϵµÄì
2019-01   3915   ºü½Ã¿Â
2015-11   3915   ¸Å´Ï¾Æ1
2014-11   3915   ´ëÇѹα¹
2018-01   3915   OSLP
2019-12   3915   ¸¶·çHOON
2016-10   3915   rÀ̽¿ør
2018-06   3915   ºÒ¹«°ñ
2017-05   3915   ¸Þ·Ð
2015-10   3915   ºñÁµå
2015-02   3915   ¼Ò³â½Ã´ë
2016-03   3915   ³«¿øÀüÀÚ
2017-03   3915   ³ªÆÄÀÌ°­½ÂÈÆ
2016-04   3916   ¾Ïºê·Î½Ã¾Æ