Skip to content

Instantly share code, notes, and snippets.

@bstaint
Created April 3, 2017 05:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bstaint/b51f219656483d0252a42e5425341b2f to your computer and use it in GitHub Desktop.
Save bstaint/b51f219656483d0252a42e5425341b2f to your computer and use it in GitHub Desktop.
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