将下面的内容完整复制到记事本txt文档中,然后扩展名改为vbs,双击直接使用即可:
const HKEY_CURRENT_USER = &H80000001 strComputer = "." Set objWMIService = GetObject("winmgmts:" _ & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2") Set colProcessList = objWMIService.ExecQuery _ ("Select * from Win32_Process Where Name = 'explorer.exe'") For Each objProcess in colProcessList objProcess.Terminate() Next Set objRegistry=GetObject("winmgmts:{impersonationLevel=impersonate}!\\" &_ strComputer & "\root\default:StdRegProv") strKeyPath1 = "Software\Classes\Local Settings\Software\Microsoft\Windows\Shell\Bags" strKeyPath2 = "Software\Classes\Local Settings\Software\Microsoft\Windows\Shell\BagMRU" strKeyPath3 = "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Streams\Defaults" DeleteSubkeys HKEY_CURRENT_USER, strKeypath1 DeleteSubkeys HKEY_CURRENT_USER, strKeypath2 DeleteSubkeys HKEY_CURRENT_USER, strKeypath3 Sub DeleteSubkeys(HKEY_CURRENT_USER, strKeyPath) objRegistry.EnumKey HKEY_CURRENT_USER, strKeyPath, arrSubkeys If IsArray(arrSubkeys) Then For Each strSubkey In arrSubkeys DeleteSubkeys HKEY_CURRENT_USER, strKeyPath & "\" & strSubkey Next End If objRegistry.DeleteKey HKEY_CURRENT_USER, strKeyPath End SubVBS文件下载地址: Windows7_explorer_kuozhan_pingpu_PiaoYun.CC