VBS版 以前的代码稍微改了下
dim fso,finm,all
set ws=wscript.createobject("wscript.shell")
set fso=createobject("scripting.filesystemobject")
QQpath=ws.regread ("HKEY_LOCAL_MACHINE\SOFTWARE\Tencent\QQ\Install")
set flnm=fso.getfolder(QQpath)
set all=flnm.subfolders
for each path in all
    dim fs,fnm
    set fs=createobject("scripting.filesystemobject")
    fnm=fs.getfilename(path)
    on error resume next
    fnm=int(fnm)
    if err.number<>13 then
       dim list
       list=list&fnm&chr(10)
    end if
next
msgbox "已登陆过的QQ号码:"&chr(10)&list,vbinformation,"清除QQ账号存留文件"