分类: WINDOWS
2012-05-04 15:55:29
打击盗版无可厚非,但这毕竟是个长远的问题。盗版的提示也确实烦了点。
已经安装了WGA的电脑可以使用以下方法清除。方法如下。
复制以下代码到记事本,并保存为RemoveWGA.vbs,双击运行即可。
'RemoveWGA.vbs
'Created by Ligy
'2008-1-21 MON
On Error Resume Next
If MsgBox("清除 “Windows Genuine Advantage” 需要使用管理员权限,请确认当前用户是否为管理员。" _
& vbCrLf & "是否继续?" _
& vbCrLf & "是,继续操作,清除“Windows Genuine Advantage”。" _
& vbCrLf & "否,结束操作。",vbQuestion+vbYesNo,"询问")=vbNo Then
Wscript.Quit
End If
Set Pros = GetObject("winmgmts:\\.\root\cimv2").ExecQuery ("Select * from Win32_Process Where Name = 'WgaTray.exe'")
For Each Pro in Pros
Pro.Terminate
Next
Set Pros = Nothing
Set WS = CreateObject("wscript.shell")
WS.Run "Regsvr32 /s /u LegitCheckControl.dll",0,True
WS.RegDelete "HKLM\SOFTWARE\Microsoft\WindowsNT\CurrentVersion\Winlogon\Notify\WgaLogon\"
WS.RegDelete "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\WgaNotify\"
Set WS = Nothing
Set FSO = CreateObject("Scripting.FileSystemObject")
SysDir=FSO.GetSpecialFolder(0) & "\system32\"
FSO.DeleteFile(SysDir & "WgaTray.exe")
FSO.DeleteFile(SysDir & "wgalogon.dll")
FSO.DeleteFile(SysDir & "LegitCheckControl.dll")
FSO.DeleteFile(SysDir & "dllcache\WgaTray.exe")
Set FSO = Nothing
MsgBox "操作已完成。",vbInformation,"提示"
代码根据网上方法所写,因本机未安装WGA,所以代码未做测试,仅做为参考。