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

   Á¶È¸ 3735   Ãßõ 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 542/5684
2015-12   1494050   ¹é¸Þ°¡
2014-05   4957613   Á¤ÀºÁØ1
10-16   650   ÇÏÇϵ¿
2009-02   6456   ÀϹÝÀ¯Àú
2017-09   4732   zaro
2021-06   2292   ¹ÙºÎÆÃÀÌ
2021-06   1986   °Ü¿ï³ª¹«
2003-04   11026   Á¤±¸¹ü
2023-02   1661   ±èµµÇü
2021-06   1551   Çϼ¿È£ÇÁ
11-06   291   ½Öcpu
2005-12   7901   ±èÀçÆò
2009-03   8190   Ǫ¸ªÀÌ
2017-10   3009   ¹Ì´ã
2005-12   5372   ÇãÁØ¿µ
2009-04   5317   ¹ÚÁ¾´ë
2012-06   6393   ¹Ì¼ö¸Ç
2014-05   6251   ¶Ñ¶Ñ±è´ë¿ø
2003-04   10076   ¼Û»óº´
2017-10   3736   ¼­¿ï»ç¶÷
2021-07   2986   fmsong
2023-02   1480   ½ÅÀº¿Ö