Ok, I have the first part. It is simply a registry value.
Imports Microsoft.Win32
And the actual code:
Dim siteString As String = "mysite.com"
Dim emptyArray() As Byte = New Byte() {} 'Works as a Zero-Length Binary Value'
Dim subKey As String = "Software\Microsoft\Internet Explorer\New Windows\Allow"
Dim rkKey As RegistryKey = Registry.CurrentUser.OpenSubKey(subKey)
Dim value As Object = rkKey.GetValue(siteString)
If value Is Nothing Then 'Check if the value is already there'
rkKey.SetValue(siteString, emptyArray, RegistryValueKind.Binary)
End If
It also works with several versions of IE and Windows.
Anyone have an idea about the Google Toolbar popup blocker?
ps. Sorry to close the single quotes, but that just makes it more enjoyable.
Gluer source
share