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

   Á¶È¸ 3457   Ãßõ 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 1/1
2017-10   3458   ¼­¿ï»ç¶÷
2017-08   3232   Sakura24
2017-07   5045   ÄĹÚ
2017-07   3119   Tabris
2017-07   4456   ±è°Ç¿ì
2017-03   14008   ĵÀ§µå
2017-03   3745   epowergate
2017-03   5810   õâÁÖ
2017-02   10227   ³­¹Ùº¸³Í