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

   Á¶È¸ 3731   Ãßõ 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 1798/5683
2014-05   4954554   Á¤ÀºÁØ1
2015-12   1491050   ¹é¸Þ°¡
2017-10   4564   µÎcpu
2017-10   4340   Æäºê¸®Áî
2017-10   3841   ¸¶Åë
2017-10   15361   ÄĹÚ
2017-10   4036   °í¼ö´åÄÄ
2017-10   3431   ¾Æ·Î´Ï¾Æ³óÀå
2017-10   4160   Á¤ÀºÁØ1
2017-10   9503   ¸Þ¸ð¸®´Ô
2017-10   3732   ¼­¿ï»ç¶÷
2017-10   3478   Çϳª·ë
2017-10   5240   jacks
2017-10   3893   ±¸ÇüÈ°¿ë°¡
2017-10   3921   ³ªÆÄÀÌ°­½ÂÈÆ
2017-10   4234   ¼Û»óº´
2017-10   3616   Ä«¼Ò½Ã½º
2017-10   3971   °­¹ÎÁØ1
2017-10   5538   ³ª¿ì¸¶Å©
2017-10   4284   Áö´ÏÄÄI¿µÁø
2017-10   3072   ¸Ó¶óÄ«´Âµ¥
2017-10   3169   ¹öÁö´Ï¾Æ