Avira AntiVir Personal - Free Antivirus Part93
日本語版をインストールした記念に広告を表示しないようにするVBSを書いてみた。
deny_avnotify.vbs
--------------------------------------------------------------------------------------
Set WshShell = CreateObject("WScript.Shell")
strRegKey = "HKLM\SOFTWARE\Policies\Microsoft\Windows\Safer\CodeIdentifiers\0\Paths\"
strRejectPath = "C:\Program Files\Avira\AntiVir Desktop\avnotify.exe"
Do
strGUID = CreateObject("Scriptlet.TypeLib").GUID
strGUID = Left(strGUID, 38)
strGUID = LCase(strGUID)
Loop While RegExist(strRegKey & strGUID & "\") = True
Call WshShell.RegWrite(strRegKey & strGUID & "\Description", "", "REG_SZ")
Call WshShell.RegWrite(strRegKey & strGUID & "\SaferFlags", 0, "REG_DWORD")
Call WshShell.RegWrite(strRegKey & strGUID & "\ItemData", strRejectPath, "REG_SZ")
Function RegExist(strRegKey)
On Error Resume Next
Call WshShell.RegRead(strRegKey)
If Err.Number = 0 Then
RegExist = True
Else
RegExist = False
End If
Err.Clear
On Error GoTo 0
End Function