The registry key is below in a Set "Key="
There are 165 subkeys. One subkey example looks like:
Code: Select all
C:\ProgramData\Microsoft\Windows\Start Menu\Programs\UltraVNC\UltraVNC Viewer\UltraVNC Viewer (Listen Mode).lnk
C:\Program Files\uvnc bvba\UltraVNC\vncviewer.exe
-listen
I don't understand enough about a for loop.
I don't understand enough about searching a subkey.
I took a stab at creating something that is currently not working:
Code: Select all
@Echo On
Set "Key=HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\UFH\SHC"
Set "Str=uvnc bvba"
setlocal EnableExtensions DisableDelayedExpansion
for /F "usebackq delims=" %%I in ("%Str%") do (Echo reg delete "%Key%" /v "%%~I" /f 2>nul
if not errorlevel 1 echo Deleted "%%~I" from %Key%
)
endlocal
cmd /k
Please give me a suggestion on how to fix the "For" loop.