1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Fixed v17 @regexist["%regkey"]

Discussion in 'Support' started by Charles G, Oct 30, 2014.

  1. Charles G

    Joined:
    Apr 2, 2011
    Messages:
    1,027
    Likes Received:
    0
    This worked in v16 but is now erroring with:

    "The parameter is incorrect."

    thanks!
     
  2. vefatica

    Joined:
    May 20, 2008
    Messages:
    7,970
    Likes Received:
    30
    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. Charles G

    Joined:
    Apr 2, 2011
    Messages:
    1,027
    Likes Received:
    0
    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
     
  4. Charles G

    Joined:
    Apr 2, 2011
    Messages:
    1,027
    Likes Received:
    0

    I am guessing there is a problem between the 32 bit and the 64bit
     
  5. rconn

    rconn Administrator
    Staff Member

    Joined:
    May 14, 2008
    Messages:
    9,869
    Likes Received:
    83
  6. Charles G

    Joined:
    Apr 2, 2011
    Messages:
    1,027
    Likes Received:
    0
    Thank you Rex. If it's ok to ask - what was the error?
     
  7. rconn

    rconn Administrator
    Staff Member

    Joined:
    May 14, 2008
    Messages:
    9,869
    Likes Received:
    83

Share This Page