#1
Posted 25 November 2011 - 02:28 PM
I just want to mention that regmulti fails on append if the key doesn't exist:
RegMulti,HKLM,%reg%\ControlSet001\Control\Class\{71A27CDD-812A-11D0-BEC7-08002BE2092F},UpperFilters,APPEND,snapman
fails if UpperFilters doesn't exist.
Rolf
#2
Posted 25 November 2011 - 03:23 PM
RegMulti is neither a WinBuilder command, nor a command described in the WinBuilder help's API section.
Appearently you have here some troubles with a proprietary script.
And that is not theme of "Bugs on the latest stable edition of WinBuilder.exe".
Peter
#3
Posted 25 November 2011 - 04:38 PM
look again in the magic wand under Registry...I think you are in the wrong train here.
RegMulti is neither a WinBuilder command, nor a command described in the WinBuilder help's API section.
Appearently you have here some troubles with a proprietary script.
And that is not theme of "Bugs on the latest stable edition of WinBuilder.exe".
Peter
#4
Posted 25 November 2011 - 04:43 PM
Sorry, Rolf!
Seems that Mr. Alzheimer is catching me.
I'll try in debugger.
Peter
#5
Posted 25 November 2011 - 05:05 PM
When the key does not exist, WinBuilder gives correctly an error message that it cannot append to a non - existing key:Good afternoon everybody,
I just want to mention that regmulti fails on append if the key doesn't exist:
RegMulti,HKLM,%reg%ControlSet001ControlClass{71A27CDD-812A-11D0-BEC7-08002BE2092F},UpperFilters,APPEND,snapman
fails if UpperFilters doesn't exist.
Rolf
[RegMulti,HKLM,Tmp_setupreg_hivControlSet001ControlClass{4D36E967-E325-11CE-BFC1-08002BE10318},UpperFilters,APPEND,PartMgr]: does not exist
IMO it is in the responsibility of the script developer, to append something only to existing items.
EDIT: Could look like this:
If,EXISTREGKEY,HKLM,Tmp_setupreg_hivControlSet001ControlClass{4D36E967-E325-11CE-BFC1-08002BE10318},UpperFilters,RegMulti,HKLM,Tmp_setupreg_hivControlSet001ControlClass{4D36E967-E325-11CE-BFC1-08002BE10318},UpperFilters,APPEND,PartMgr Else,RegWrite,HKLM,0x7,Tmp_setupreg_hivControlSet001ControlClass{4D36E967-E325-11CE-BFC1-08002BE10318},UpperFilters,PartMgr
An automatic creation of a missing key is not recommended.
Imagine that the developer did a small misspelling of the key. When WinBuilder creates it silently, the developer would get knowledge about this only after hard debug work, when something does not work as assumed.
To create and give a warning, is also not recommended, because many people like not to show warnings.
Peter
#6
Posted 25 November 2011 - 06:04 PM
When the key does not exist, WinBuilder gives correctly an error message that it cannot append to a non - existing key:
[RegMulti,HKLM,Tmp_setupreg_hivControlSet001ControlClass{4D36E967-E325-11CE-BFC1-08002BE10318},UpperFilters,APPEND,PartMgr]: does not exist
Actually the error is not at all "clear".
WHAT is not existing?
This (fake) error message:
or:[RegMulti,HKLM,Tmp_setupreg_hivControlSet001ControlClass{4D36E967-E325-11CE-BFC1-08002BE10318},UpperFilters,APPEND,PartMgr]: Error Key "UpperFilters" does not exist
[RegMulti,HKLM,Tmp_setupreg_hivControlSet001ControlClass{4D36E967-E325-11CE-BFC1-08002BE10318},UpperFilters,APPEND,PartMgr]: Error THe specified path does not exist
would be more clear IMHO.
Since the Registry is a filesystem , when you do:
COPY C:foo.txt D:IdontExistfoo.txtin a console (given that directory D:IdontExist does not actually exists) you get error:
Cannot find specified PATH...
that gives you a hint that you have to make sure that directory D:IdontExist actually exists and you can add a check and a md command.....
Wonko
#7
Posted 25 November 2011 - 07:21 PM
#8
Posted 25 November 2011 - 07:46 PM
Thanks for the fast reaction, Scott!Agree that error from WB could be better, but also added comment to the docs on the wiki, and pointer back to this topic.
But as usual, I have some concerns:
There should the same Note: for the section.
A typo Th (e?)
And with item #1 we have the issue Wonko speaks about:
Currently WinBuilder only gets to know from Billy The Gates, that there is something wrong with opening the key.
To decide and create an "Error Message for Dummies", after getting the error, WinBuilder has to do some tests in order to be able to write a more detailled message.
I do not want to spend the time to code (with all possible first-coding-bugs etc.)
Peter
#9
Posted 25 November 2011 - 07:57 PM
I do not want to spend the time to code (with all possible first-coding-bugs etc.)
How long it takes to replace "does not exist" with "The specified Registry PATH does not exist"?
Wonko
#10
Posted 25 November 2011 - 08:03 PM
This is why MANY eyes looking at the docs can see much more than my own set of just two eyes...Fixed and added!Thanks for the fast reaction, Scott!
But as usual, I have some concerns:
#11
Posted 25 November 2011 - 08:06 PM
I suppose that depends on wether or not WB is generating the message text or passing it directly on from the Windows APIHow long it takes to replace "does not exist" with "The specified Registry PATH does not exist"?
Wonko
#12
Posted 25 November 2011 - 08:07 PM
You can do it for yourself in some seconds.How long it takes to replace "does not exist" with "The specified Registry PATH does not exist"?
Wonko
Just change in ToolsLanguages<your language>.txt
!#2209=does not existto
!#2209=The specified Registry PATH does not existBut maybe that as report about a missing icon, you get the message
If you like that, it is your pleasure!The specified Registry PATH does not exist
Peter
#13
Posted 25 November 2011 - 08:41 PM
It is a generic "does not exist" error message.
Then, I guess that this would be - if not more clear - at least more sincere:
or:!#2209=*something* among the *whatever* needed by this command does not exist
!#2209=HI, I am a generic error, *something* does not exist
or (more aggressive ):
!#2209=Generic error #2209, *something* does not exist (and it's your fault as you suck at writing .scripts)
or (plain generic english)
!#2209=An error occurred...
Wonko
#14
Posted 25 November 2011 - 08:54 PM
But perhaps that can cause some developers to switch to the Over forum
(In those cases of unprofessional developers maybe not a big loss? )
Peter
#15
Posted 25 November 2011 - 11:31 PM
In this case though I agree with the first post that its a bug more than a feature.
#16
Posted 26 November 2011 - 09:24 AM
[Failed] [RegMulti,HKLM,Tmp_setupreg_hivControlSet001ControlClass{4D36E967-E325-11CE-BFC1-08002BE103},UpperFilters,APPEND,PartMgr]: Tmp_setupreg_hivControlSet001ControlClass{4D36E967-E325-11CE-BFC1-08002BE103} does not exist [Failed] [RegMulti,HKLM,Tmp_setupreg_hivControlSet001ControlClass{4D36E967-E325-11CE-BFC1-08002BE10318},UpperFilters,APPEND,PartMgr]: Tmp_setupreg_hivControlSet001ControlClass{4D36E967-E325-11CE-BFC1-08002BE10318},UpperFilters does not exist
Will be in next release.
Peter
#17
Posted 26 November 2011 - 12:09 PM
I changed WinBuilder to bring a more meaningful message:
....
Will be in next release.
Wonko
P.s.: unfortunately antoher nice example of the current stupid board software the codebox doesn't scroll on the right......
#18
Posted 26 November 2011 - 03:56 PM
excellent. thanks.I changed WinBuilder to bring a more meaningful message:
[Failed] [RegMulti,HKLM,Tmp_setupreg_hivControlSet001ControlClass{4D36E967-E325-11CE-BFC1-08002BE103},UpperFilters,APPEND,PartMgr]: Tmp_setupreg_hivControlSet001ControlClass{4D36E967-E325-11CE-BFC1-08002BE103} does not exist [Failed] [RegMulti,HKLM,Tmp_setupreg_hivControlSet001ControlClass{4D36E967-E325-11CE-BFC1-08002BE10318},UpperFilters,APPEND,PartMgr]: Tmp_setupreg_hivControlSet001ControlClass{4D36E967-E325-11CE-BFC1-08002BE10318},UpperFilters does not exist
Will be in next release.
Peter
#19
Posted 28 November 2011 - 09:43 AM
thanks for all your comments. This is really a living forum.
Back to the issue in focus:
I think RegMulti should work in the same way as reg_add. If the key doesn't exist it should be created of course. Reg_add has no need to do something like
If,Not,EXISTREGKEY, ... reg_add ...
to avoid warnings.
#20
Posted 28 November 2011 - 09:54 AM
Reg_add is intended to add a non existent value.
If an existing value is overwritten, a warning (depending on build options) is given.
Peter
#21
Posted 28 November 2011 - 10:18 PM
#22
Posted 29 November 2011 - 12:49 PM
Probably a new function should be added to the common api to wrap the method with a function that does the if not exists, write else .. calls.
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users