'Remove Bing bar
Option Explicit:On Error Resume Next
Dim ws,osType,BingProductCode,bing,i:i=0:Set ws=WScript.CreateObject("WScript.Shell")

osType = GetObject("winmgmts:root\cimv2:Win32_Processor='cpu0'").AddressWidth
remove_string(osType)
If bing<>"" Then ws.Run(bing&" /q"),1,True:i=1
ws=Nothing:Wscript.Quit(i)

Function remove_string(osType)

  Select Case Ucase(osType)
    
    Case "64"
	  BingProductCode=ws.RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\BingBar\ProductCode")
	  bing=ws.RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\"&BingProductCode&"\UninstallString")	  
    
    Case "32"
	  BingProductCode=ws.RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\BingBar\ProductCode")
	  bing=ws.RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\"&BingProductCode&"\UninstallString")

  End Select

End Function