How to use RegQuery for value with \name

May 20, 2008
603
0
Sammamish, WA
I'm having a problem with using %@RegQuery because my value has a name
that begins with a backslash. I have two values in one key named
"Console" and "\EmuClock"

This correctly shows the value Console, but how do I show the \EmuClock value?

echo %@regquery["HKEY_CURRENT_USER\Software\Strobe
Data\Kestrel\aks100mb.custom\Console"]

All these return -1:

echo %@regquery["HKEY_CURRENT_USER\Software\Strobe
Data\Kestrel\aks100mb.custom\EmuClock"]
echo %@regquery["HKEY_CURRENT_USER\Software\Strobe
Data\Kestrel\aks100mb.custom\\EmuClock"]
echo %@regquery["HKEY_CURRENT_USER\Software\Strobe
Data\Kestrel\aks100mb.custom\.\EmuClock"]
echo %@regquery["HKEY_CURRENT_USER\Software\Strobe
Data\Kestrel\aks100mb.custom\\\EmuClock"]
echo %@regquery["HKEY_CURRENT_USER\Software\Strobe
Data\Kestrel\aks100mb.custom\%=\\EmuClock"]
echo %@regquery["HKEY_CURRENT_USER\Software\Strobe
Data\Kestrel\aks100mb.custom\%=\EmuClock"]


--
Jim Cook
2009 Saturdays: 4/4, 6/6, 8/8, 10/10, 12/12 and 5/9, 9/5, 7/11, 11/7.
Next year they're Sunday.
 

samintz

Scott Mintz
May 20, 2008
1,488
15
Solon, OH, USA
Jim,

Can you query the key using the external application REG.EXE? I don't
know if it is a parsing limitation in TCC or Win32.

-Scott

Jim Cook <> wrote on 06/01/2009 12:05:33 PM:


> I'm having a problem with using %@RegQuery because my value has a name
> that begins with a backslash. I have two values in one key named
> "Console" and "\EmuClock"
>
> This correctly shows the value Console, but how do I show the \EmuClock
value?

>
> echo %@regquery["HKEY_CURRENT_USER\Software\Strobe
> Data\Kestrel\aks100mb.custom\Console"]
>
> All these return -1:
>
> echo %@regquery["HKEY_CURRENT_USER\Software\Strobe
> Data\Kestrel\aks100mb.custom\EmuClock"]
> echo %@regquery["HKEY_CURRENT_USER\Software\Strobe
> Data\Kestrel\aks100mb.custom\\EmuClock"]
> echo %@regquery["HKEY_CURRENT_USER\Software\Strobe
> Data\Kestrel\aks100mb.custom\.\EmuClock"]
> echo %@regquery["HKEY_CURRENT_USER\Software\Strobe
> Data\Kestrel\aks100mb.custom\\\EmuClock"]
> echo %@regquery["HKEY_CURRENT_USER\Software\Strobe
> Data\Kestrel\aks100mb.custom\%=\\EmuClock"]
> echo %@regquery["HKEY_CURRENT_USER\Software\Strobe
> Data\Kestrel\aks100mb.custom\%=\EmuClock"]
>
>
> --
> Jim Cook
> 2009 Saturdays: 4/4, 6/6, 8/8, 10/10, 12/12 and 5/9, 9/5, 7/11, 11/7.
> Next year they're Sunday.
>
>
>
>
>
>
 
May 20, 2008
603
0
Sammamish, WA
I was unable to query the value directly using REG, but could filter
the output from REG and get what I was looking for. Thanks for the
pointer.

My question still remains -- is it possible with TCC directly using @REGQUERY?

On Tue, Jun 2, 2009 at 7:35 AM, samintz <> wrote:

> Jim,
>
> Can you query the key using the external application REG.EXE? *I don't
> know if it is a parsing limitation in TCC or Win32.
>
> -Scott
>
> Jim Cook <> wrote on 06/01/2009 12:05:33 PM:
>
>
>
> ---Quote---
>> I'm having a problem with using %@RegQuery because my value has a name
>> that begins with a backslash. I have two values in one key named
>> "Console" and "\EmuClock"
>>
>> This correctly shows the value Console, but how do I show the \EmuClock
> ---End Quote---
> value?
>
>
> ---Quote---
>>
>> echo %@regquery["HKEY_CURRENT_USER\Software\Strobe
>> Data\Kestrel\aks100mb.custom\Console"]
>>
>> All these return -1:
>>
>> echo %@regquery["HKEY_CURRENT_USER\Software\Strobe
>> Data\Kestrel\aks100mb.custom\EmuClock"]
>> echo %@regquery["HKEY_CURRENT_USER\Software\Strobe
>> Data\Kestrel\aks100mb.custom\\EmuClock"]
>> echo %@regquery["HKEY_CURRENT_USER\Software\Strobe
>> Data\Kestrel\aks100mb.custom\.\EmuClock"]
>> echo %@regquery["HKEY_CURRENT_USER\Software\Strobe
>> Data\Kestrel\aks100mb.custom\\\EmuClock"]
>> echo %@regquery["HKEY_CURRENT_USER\Software\Strobe
>> Data\Kestrel\aks100mb.custom\%=\\EmuClock"]
>> echo %@regquery["HKEY_CURRENT_USER\Software\Strobe
>> Data\Kestrel\aks100mb.custom\%=\EmuClock"]
>>
>>
>> --
>> Jim Cook
>> 2009 Saturdays: 4/4, 6/6, 8/8, 10/10, 12/12 and 5/9, 9/5, 7/11, 11/7.
>> Next year they're Sunday.
>>
>>
>>
>>
>>
>>
> ---End Quote---
>
>
>
>



--
Jim Cook
2009 Saturdays: 4/4, 6/6, 8/8, 10/10, 12/12 and 5/9, 9/5, 7/11, 11/7.
Next year they're Sunday.
 
Similar threads
Thread starter Title Forum Replies Date
vefatica @REGQUERY with hostname fails Support 12
S %@REGQUERY function Support 1
Fross Deleting Registry DWord Value Support 2
R Problem with @INT[ value] in V26 Support 9
Peter Murschall OPTION //directive=value is a ENDLOCAL Support 3
T Returning a value from internal Lua scripts to TCC Support 2
A How to safely print variable's value without quotes? Support 9
D Envar _tcexit has value, even with /IX startup parameter Support 0
Steve Pitts Maximum value of Buffer Rows Support 7
I Change value of a variable while debugging Support 3
S How to? Monitor shutdown event and write registry value Support 2
G WAD _DOS and VER/r returns incorect value Support 2
D Minor problem. Incorrect value internal var _dir_files Support 7
B Why Does @GETDIR Repeat Selected Directory Name In Returned Value Support 7
samintz How to? Sort on hex value Support 7
T Strange CPU value Support 3
vefatica DO variable left with empty value Support 0
vefatica Is this of any value? Support 2
D Bad CPU value in status bar Support 2
Charles Dye Create empty registry value? Support 5
Joe Caverly How to? Get name of current LIBRARY function? Support 4
vefatica Command name mix-up Support 3
Jay Sage Command Will Not Run Using Short Name of Path Support 5
Chen Touboul When i try to delete an empty folder i got "the dirctoy name is invalid" Support 3
vefatica LIBRARY and file name completion? Support 4
vefatica PLAYSOUND requires 8-dot-3 name? Support 8
R Tree on FAT32 does not sort by name by default. Support 6
vefatica START /PGM "name with spaces.URL" fails Support 2
vefatica Can TCC complete this file name? Support 5
thorntonpg option /u not working The directory name is invalid Support 5
Dmitry L. Kobyakov WAD Start /pgm "name.htm" works improperly Support 4
vefatica Array name in a variable? Support 3
E My echo full file name to the clipboard fails now. Support 2
Joe Caverly @NAME supports library functions Support 2
H file name completion on tcc21.01.61 Support 4
C See if a file name matches extended range. Support 15
vefatica Two @FUNCTIONs/aliases with the same name Support 4
x13 Function to get interface user-defined name? Support 10
nickles Command name parsing of GNU compilers Support 13
M Registered to machine-name? Support 7
P Rename files with ampersand in the name Support 1
mdwyer TCC 13 COPY: specified network name is no longer available. Support 5
R How to? Name completion only of directories? Support 3
I "IF" command in a variable does not expand redirection variable name Support 0
nickles Fixed Executing long command lines in a batch generates file name errors Support 16
Jay Sage Short File Name Won't Execute Support 4
rps Fixed V17 @name adding quote (") to result Support 5
vefatica FFIND /S, find directory with specified name? Support 7
jbanaszczyk Alias with space in the name Support 3
tmaynard Invalid item name "Lua" Support 6

Similar threads