Created
November 28, 2013 19:00
-
-
Save whatisinternet/7696747 to your computer and use it in GitHub Desktop.
This will hide the irritating bing desktop application in windows update. (May require the batch file to be run as administrator)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
::------------------------- | |
:: Name: bingHide.cmd | |
:: Author: Josh Teeter | |
:: Date: 2013-06-26 | |
:: Version: 1.0.0.0 | |
:: Purpose: This will hide bing desktop | |
::------------------------- | |
powershell Set-ExecutionPolicy bypass | |
powershell -File "%~dp0\bingHide.ps1" | |
powershell Set-ExecutionPolicy Restricted | |
timeout 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#---------------------------- | |
# Filename: bingHide.ps1 | |
# Author: Josh Teeter | |
# Date: 2013-06-26 | |
# Version: 1.0.0.5 | |
# Purpose: This will hide the "bing desktop" applications in their various forms. | |
#---------------------------- | |
# | |
# Create a windows update session, and an update searcher. Then use the searcher | |
# to generate a list of not hidden or installed updates on windows. | |
# See if any of the updates contain the word *Bing*. | |
# | |
function getBing{ | |
$bing = $null | |
write-host "Searching for bing..." | |
$UpdateSession = New-Object -ComObject Microsoft.Update.Session | |
$UpdateSearcher = $UpdateSession.CreateUpdateSearcher() | |
$SearchResult = $UpdateSearcher.Search("IsHidden=0 and IsInstalled=0") | |
$bing = $SearchResult.updates | where { $_.Title -like "*Bing*" } | |
return $bing | |
} | |
function hideBing{ | |
# | |
# Loop through the updates and hide them. | |
# | |
$bing = getBing | |
try{ | |
while ($bing) { | |
write-host "Found:" $bing.Title | |
$bing.IsHidden = 1 | |
write-host $bing.Title "has been hidden." | |
$bing = getBing | |
} | |
}catch{ | |
"Searching for bing desktop has died." | |
} | |
} | |
function main{ | |
write-host "Josh Teeter 2013" | |
write-host "----------------" | |
write-host "" | |
write-host "" | |
write-host "This script will hide Bing updates from Windows Update" | |
Write-host "" | |
hideBing | |
} | |
main |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment