Created
April 3, 2017 05:51
-
-
Save bstaint/b51f219656483d0252a42e5425341b2f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
hash := "" | |
exe := "D:\Portable\CentBrowser\chrome.exe" | |
Loop HKEY_LOCAL_MACHINE,SOFTWARE\RegisteredApplications, 1, 1 | |
{ | |
If (A_LoopRegType <> "KEY") | |
RegRead Value | |
StringGetPos, pos, A_LoopRegName, Cent Browser | |
if(pos >= 0) | |
{ | |
hash := SubStr(A_LoopRegName, InStr(A_LoopRegName, ".") + 1) | |
break | |
} | |
} | |
if(hash <> "") | |
{ | |
RegRead, value, HKEY_CLASSES_ROOT, CentHTM.%hash%\shell\open\command | |
StringGetPos, pos2, value, incognito | |
if(pos2 >= 0) | |
{ | |
RegWrite, REG_SZ, HKEY_CLASSES_ROOT, CentHTM.%hash%\shell\open\command, , `"%exe%`" -- `"`%1`" | |
Msgbox, 清除成功 | |
} | |
else | |
{ | |
RegWrite, REG_SZ, HKEY_CLASSES_ROOT, CentHTM.%hash%\shell\open\command, , `"%exe%`" --incognito -- `"`%1`" | |
Msgbox, 写入成功 | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment