Fixed v17 @regexist["%regkey"]

#2
Seems OK here (if I'm not misunderstanding).
Code:
v:\> ver

TCC  17.00.34  Windows 7 [Version 6.1.7601]

v:\> set key=HKCU\Control Panel

v:\> echo %@REGEXIST["%key"]
1

v:\> set key=HKCU\Environment

v:\> echo %@REGEXIST["%key"]
1
 
#3
Taken from RegTweaks.btm:

Code:
do regkey in /t"," /l HKCR\.bat,HKCR\.btm,HKCR\.cmd,HKCR\Directory\shell,HKCR\Drive\shell,HKCR\batfile,HKCR\btmfile,HKCR\cmdfile,HKLM\Software\Microsoft\Windows\CurrentVersion\App Paths\4nt.exe,HKLM\Software\Microsoft\Windows\CurrentVersion\App Paths\tcc.exe,HKLM\Software\Microsoft\Windows\CurrentVersion\App Paths\tcmd.exe
   set regkey=%@trim[%regkey]
   if "%@left[5,%regkey]" == "HKCR\" set regkey=HKEY_CLASSES_ROOT\%@right[-5,%regkey]
   if "%@left[5,%regkey]" == "HKLM\" set regkey=HKEY_LOCAL_MACHINE\%@right[-5,%regkey]
   echos .

   echo. >> %backupname
   echo [-%regkey] >> %backupname

   iff %@regexist["%regkey"] then
      del /e /q %tempfile
      regedit /e %tempfile "%regkey"
      ffind /+1 /k /v /m /t"%=r" %tempfile >> %backupname
   endiff
enddo
TCC 17.00.34 x64 Windows 7 [Version 6.1.7601]
TCC Build 34 Windows 7 Build 7601 Service Pack 1
Registered to Charles S Galloway