Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

Trouble with @REGSET[]

May
34
0
Hi,

IMHO the following is a bug. (I just report something, not asking for help)

An important btm file I used for several years, causes big trouble today. The BTM is used to switch to another desktop. To day, it was first executed since upgrade from v19 to v2r. The result was an error message on an empty desktop: F:\users\dataruud\desktop does not exist.
But I can open that location and it is there? Microsoft kidding?

Investigating the problem, i found that the new location in the registry, had a leading blank.

TEST.BTM

@echo off
set where=%1
set curname="HKCU_64\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders\TestValue"
set result=%@regset[%curname, REG_EXPAND_SZ, %where]
echo %result
pause

After execution: test.btm F:\Users\DataRuud\Desktop

the stored value has a leading blank. Cause: in V26 the blank between _SZ and %where is used as part of the value %where. On another machine, not yet updated, everything is ok.
 
I'm not sure it's a bug. Many variable functions behave that way when they expect a string parameter, even in v19.

1598193834862.png
 
Testing how some other function behaves, is not professional. It should work as documented. See the documentation of @REGSET and what is told about spaces there.
 
Testing how some other function behaves, is not professional. It should work as documented. See the documentation of @REGSET and what is told about spaces there.
That comment in the help seems inappropriate. In both v19 and v26, you get the spaces even without quotes and if you do use quotes the quotes wind up in the value's data.

1598198775852.png
 
A registry function, in a new release of TCC, works undocumented different from an early version, in such a way that the OS becomes inaccessible.

May call that established fact, a serious problem?

Is there a place where I can report that fact to the designers, to make good things even better in an update or next release?
 
Testing how some other function behaves, is not professional. It should work as documented. See the documentation of @REGSET and what is told about spaces there.

@REGSET data parsing was changed several years ago because some users were complaining that they couldn't enter leading / trailing whitespace for their data. (Don't ask me why they wanted to do that.)

That note in the @REGSET documentation about using quotes is referring to the value argument, not the data.

The data will be read exactly as-is; including quotes and whitespace. (Commas are still parsed so you can enter multiple arguments for REG_MULTI_SZ.)
 

Similar threads

Back
Top