Hi, I'm currently trying to run a batch script to delete CLSID registry keys by their name stored in (Default) value.
I'm stuck on this part, here is the text file I currently have:
Here is my current code it may explain better what I am trying to achieve.
I'm stuck on this part, here is the text file I currently have:
HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\SearchScopes\{2167fbfc-aacb-4086-9f11-77631b0f211B}How can associate "Bcool" with HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\SearchScopes\{2167fbfc-aacb-4086-9f11-77631b0f211c} so that only the registry key is output into a file. I want to leave the "Bing" key alone so I want to be able to associate Bing with HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\SearchScopes\{2167fbfc-aacb-4086-9f11-77631b0f211B} and filter it out from the upcoming text file.
(Default) REG_SZ Bing
HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\SearchScopes\{2167fbfc-aacb-4086-9f11-77631b0f211c}
(Default) REG_SZ Bcool
Here is my current code it may explain better what I am trying to achieve.
Code: Select all
Thanks for any help :)@Echo off
:: nameblaster.bat
:: Created by Thisisu
:: Last updated: 12.27.2012
:: Latest change: Initial release. Target BHOS, URLSearchHooks, SearchScopes by their name
:: findstr errorlevels
:: ERRORLEVEL 0 = MATCH FOUND! / INFECTED!
:: ERRORLEVEL 1 = NO MATCHES / CLEAN!
goto sshkcu1
:sshkcu1
reg query "HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\SearchScopes" /ve /s>%systemdrive%\JRT\temp\sshkcu1.txt
findstr /i /g:%systemdrive%\JRT\nameblaster.cfg %systemdrive%\JRT\temp\sshkcu1.txt>%systemdrive%\JRT\temp\sshkcu2.txt
IF ERRORLEVEL 1 (
goto sshkcu2
) else (
goto FIXsshkcu1
)
:FIXsshkcu1
findstr /i "Microsoft\Internet Explorer" %systemdrive%\JRT\temp\sshkcu1.txt>%systemdrive%\JRT\temp\sshkcu1SETUP.txt
for /f "tokens=*" %%g IN (%systemdrive%\JRT\temp\sshkcu1SETUP.txt) do (
reg query "%%g" /ve>>%systemdrive%\JRT\temp\sshkcu1SETUP2.txt
)
pause
:sshkcu2
Echo(I did not find anything bad in sshkcu1
pause