Jump to content











Photo
- - - - -

Bug in Reg_Add,0x0, ?


  • Please log in to reply
4 replies to this topic

#1 TheGnome

TheGnome
  • Members
  • 3 posts
  • Location:Bern
  •  
    Switzerland

Posted 22 October 2011 - 08:45 AM

I'm quite new to WinBuilder, so I'm certainly not sure, but I think I may have found a bug.
I'm also quite new to this forum so I'm not sure if I place this thread in the proper place but anyway here it goes.

This code snippet

reg_add,0x0,%reg%SoftwareMicrosoftWindowsCurrentVersionExplorerFileExts.pdfOpenWithProgids,SumatraPDF


gives the expected result in the registry, namely a ValueName SumatraPDF of ValueType REG_NONE and Value (Binary value of length zero).

But at the same time it produces the following warning in the log:

Invalid parameter count:[reg_add,0x0,%reg%SoftwareMicrosoftWindowsCurrentVersionExplorerFileExts.pdfOpenWithProgids,SumatraPDF]

Now this code

reg_add,0x0,%reg%SoftwareMicrosoftWindowsCurrentVersionExplorerFileExts.pdfOpenWithProgids

just creates an empty registry key, as it should, and is executed without warning.

If I use RegWrite in place of Reg_Add, the same results are produced.

Well, is this a bug or am I just being dumb ?
If it is a bug, it is certainly not very serious. But I treat warnings always as something to look into. Now after many occurencies of this false warning I might just miss something a bit more serious.

By the way there is a discrepany in the documentation for Reg_Add and RegWrite. I would think the keytype of 0x0 as noted in the tips for Reg_Add is correct.

Tips for Reg_Add



Creating an empty registry key: Write a key using keytype as [color=#ff0000]0x0[/color] and omit the entries for ValueName and Value -

this will create a new registry key at the location you specify.

Tips for RegWrite



To create an empty section: Write a key using keytype as [color=#ff0000]0x1[/color] and omit the entries for key and value -

this will create a new section at the location you specify.

Edit: Sorry I seem to have messed up with the color tags but I can't fix it.

Edited by TheGnome, 22 October 2011 - 08:50 AM.


#2 pscEx

pscEx

    Platinum Member

  • Team Reboot
  • 12707 posts
  • Location:Korschenbroich, Germany
  • Interests:What somebody else cannot do.
  •  
    European Union

Posted 22 October 2011 - 01:03 PM

The warning is really a bug. I corrected in the WinBuilder source code, and the fix will be included in the next release.

[083]
date 2011-aug-16
fixed - bug in GetParam
changed - source editor line length increased from 1024 to 10240
fixed - "Invalid parameter count" warning in RegWrite 0x0

Peter

#3 sbaeder

sbaeder

    Gold Member

  • .script developer
  • 1338 posts
  • Location:usa - massachusettes
  •  
    United States

Posted 22 October 2011 - 06:22 PM

And I will fix the docs...

Thanks

#4 TheGnome

TheGnome
  • Members
  • 3 posts
  • Location:Bern
  •  
    Switzerland

Posted 22 October 2011 - 08:39 PM

Wow ! That's fast !

Thanks pscEx and sbaeder

#5 sbaeder

sbaeder

    Gold Member

  • .script developer
  • 1338 posts
  • Location:usa - massachusettes
  •  
    United States

Posted 23 October 2011 - 04:30 AM

We aim to please!




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users