故事情节是下面这个样子的,我不想通过批处理
@ECHO OFF&PUSHD %~DP0 &TITLE 卸载
Rd "%WinDir%\system32\test_permissions" >NUL 2>NUL
Md "%WinDir%\System32\test_permissions" 2>NUL||(Echo 请使用右键管理员身份运行!&&Pause >nul&&Exit)
Rd "%WinDir%\System32\test_permissions" 2>NUL
SetLocal EnableDelayedExpansion
taskkill /f /im IDM* >NUL 2>NUL
taskkill /f /im IEMon* >NUL 2>NUL
If Exist "%Public%" Net Stop IDMWFP >NUL 2>NUL
If Not Exist "%Public%" Net Stop IDMTDI >NUL 2>NUL
If Exist "%Public%" Rundll32 setupapi.dll,InstallHinfSection DefaultUninstall 128 .\idmwfp.inf
If Not Exist "%Public%" Rundll32 setupapi.dll,InstallHinfSection DefaultUninstall 128 .\idmtdi.inf
If Exist "%WinDir%\SysWOW64" Regsvr32 /s /u IDMShellExt64.dll
rd/s/q "%AppData%\IDM"2>NUL
If Exist "%a%" rd/s/q "%ProgramData%\IDM" 2>NUL
rd/s/q "%AllUsersProfile%\Application Data\IDM"2>NUL
reg delete HKCU\Software\DownloadManager /v scansk /f>NUL 2>NUL
reg delete HKCU\Software\DownloadManager /v tvfrdt /f>NUL 2>NUL
reg delete HKCU\Software\DownloadManager /v CheckUpdtVM /f>NUL 2>NUL
reg delete HKCU\Software\DownloadManager /v LName /f>NUL 2>NUL
reg delete HKCU\Software\DownloadManager /v FName /f>NUL 2>NUL
reg delete HKCU\Software\DownloadManager /v Email /f>NUL 2>NUL
reg delete HKCU\Software\DownloadManager /v Serial /f>NUL 2>NUL
reg delete "HKLM\SOFTWARE\Internet Download Manager" /f>NUL 2>NUL
reg delete "HKLM\SOFTWARE\Wow6432Node\Internet Download Manager" /f>NUL 2>NUL
reg delete HKCU\Software\Classes\CLSID\{07999AC3-058B-40BF-984F-69EB1E554CA7} /f>NUL 2>NUL
reg delete HKCU\Software\Classes\CLSID\{6DDF00DB-1234-46EC-8356-27E7B2051192} /f>NUL 2>NUL
reg delete HKCU\Software\Classes\CLSID\{D5B91409-A8CA-4973-9A0B-59F713D25671} /f>NUL 2>NUL
reg delete HKCU\Software\Classes\CLSID\{7B8E9164-324D-4A2E-A46D-0165FB2000EC} /f>NUL 2>NUL
reg delete HKCU\Software\Classes\CLSID\{5ED60779-4DE2-4E07-B862-974CA4FF2E9C} /f>NUL 2>NUL
reg delete HKLM\Software\Classes\CLSID\{07999AC3-058B-40BF-984F-69EB1E554CA7} /f>NUL 2>NUL
reg delete HKLM\Software\Classes\CLSID\{6DDF00DB-1234-46EC-8356-27E7B2051192} /f>NUL 2>NUL
reg delete HKLM\Software\Classes\CLSID\{D5B91409-A8CA-4973-9A0B-59F713D25671} /f>NUL 2>NUL
reg delete HKLM\Software\Classes\CLSID\{7B8E9164-324D-4A2E-A46D-0165FB2000EC} /f>NUL 2>NUL
reg delete HKLM\Software\Classes\CLSID\{5ED60779-4DE2-4E07-B862-974CA4FF2E9C} /f>NUL 2>NUL
reg delete HKCU\Software\Classes\Wow6432Node\CLSID\{7B8E9164-324D-4A2E-A46D-0165FB2000EC} /f>NUL 2>NUL
reg delete HKCU\Software\Classes\Wow6432Node\CLSID\{5ED60779-4DE2-4E07-B862-974CA4FF2E9C} /f>NUL 2>NUL
reg delete HKLM\Software\Classes\Wow6432Node\CLSID\{7B8E9164-324D-4A2E-A46D-0165FB2000EC} /f>NUL 2>NUL
reg delete HKLM\Software\Classes\Wow6432Node\CLSID\{5ED60779-4DE2-4E07-B862-974CA4FF2E9C} /f>NUL 2>NUL
taskkill /f /im explorer.exe >NUL 2>NUL & start explorer
ECHO.&ECHO.完成! 是否需要备份个人设置?
ECHO.&ECHO.是请按任意键,否直接关闭吧!&PAUSE >NUL 2>NUL
regedit /e "用户配置.reg" HKEY_CURRENT_USER\Software\DownloadManager >NUL 2>NUL
reg delete HKEY_CURRENT_USER\Software\DownloadManager /f>NUL 2>NUL
ECHO.&ECHO.完成! &PAUSE >NUL 2>NUL
来让IDM把注册表键值删除掉,
我想尝试让IDM退出时,自己把自己的注册表键值清除掉(点退出时,加入我们的改良代码)
利用下面的API函数(OD中找到的)
RegDeleteKeyA
RegDeleteValueA
RegDeleteValueW
-------------------------------------------------------------------
名称位于 whoknow4, 条目 433
地址=00613020
区段=.rdata
类型=输入 (已知)
名称=ADVAPI32.RegDeleteKeyA
名称位于 whoknow4, 条目 434
地址=0061300C
区段=.rdata
类型=输入 (已知)
名称=ADVAPI32.RegDeleteValueA
名称位于 whoknow4, 条目 435
地址=00613040
区段=.rdata
类型=输入 (已知)
名称=ADVAPI32.RegDeleteValueW
)
004409F5 |. 6A 00 push 0x0 ; /pDisposition = NULL
004409F7 |. 68 BC226D00 push whoknow4.006D22BC ; |pHandle = whoknow4.006D22BC
004409FC |. 6A 00 push 0x0 ; |pSecurity = NULL
004409FE |. 68 3F000F00 push 0xF003F ; |Access = KEY_ALL_ACCESS
00440A03 |. 6A 00 push 0x0 ; |Options = REG_OPTION_NON_VOLATILE
00440A05 |. 6A 00 push 0x0 ; |Class = NULL
00440A07 |. 6A 00 push 0x0 ; |Reserved = 0x0
00440A09 |. 68 90726A00 push whoknow4.006A7290 ; |Subkey = "Software\DownloadManager\"
00440A0E |. 68 01000080 push 0x80000001 ; |hKey = HKEY_CURRENT_USER
00440A13 FF15 14306100 call near dword ptr ds:[<&ADVAPI32.RegCreateKeyExA>] ; advapi32.RegCreateKeyExA ;当程序运行到这个地方时,生成 HKEY_CURRENT_USER\software\DownloadManager键值
我尝试,把这句改成了
00440A13 FF15 20306100 call near dword ptr ds:[<&ADVAPI32.RegDeleteKeyA>] ; advapi32.RegDeleteKeyA
即
call near dword ptr ds:[0061300C]
改成了上面这个样子,果然能把相关的注册表键值
HKEY_CURRENT_USER\software\DownloadManager干掉了,
但问题来了,如果旗下有注册表子键分支就没有了效果。
网上科谱下之后,发现一篇文章http://blog.csdn.net/yiyefangzhou24/article/details/6134536
原来下面的那三个只能删除掉没子子分支的空目录 键值。。。
是不行的,要遍历。。。才能进行下去,而比较省事的办法是
需要
RegDeleteTree 或 SHDeleteKey 这样API函数,可是本身没有啊,OD中ctrl+n
只看到了
ADVAPI32.RegDeleteKeyA
ADVAPI32.RegDeleteValueA
ADVAPI32.RegDeleteValueW
所以问题来,求相关 用lordPE的视频 加功能 加API 改良软件的视频
[注意]传递专业知识、拓宽行业人脉——看雪讲师团队等你加入!