代码目标:杀掉暗黑2R的多开验证handle (DiabloII Check For Other Instances)
环境:win10 64位
资料来源:凯恩之角,原出处不详。
需要把handle64.exe放入系统盘的Windows\System32文件夹,如C:\Windows\System32
hanle64获取:Handle - Windows Sysinternals | Microsoft Learn
32位系统则调用handle.exe ,代码做相迎修改即可。无环境,未亲测。
使用方法:代码复制到文本文档,另存为.VBS格式,双击运行
getfolder = left(wscript.scriptfullname,instrrev(wscript.scriptfullname,""))
Set shell = CreateObject("WScript.Shell")
Set exec = shell.Exec( "C:\Windows\System32\handle64.exe -a -p D2R.exe Instances") '获取包含Instances的句柄
strText = exec.StdOut.ReadAll()
'msgbox strText,1,"handle"
s = split(strText, chr(10))
'msgbox UBound(s)
for i = 0 to UBoun