auto registration and windows registry problem

For general issues related to PWB v2.

Moderators: Tyler, Scott, PWB v2 Moderator

Post Reply
MaderaLibrary
Observer
Observer
Posts: 4
Joined: Wed Jul 04, 2012 4:00 pm

auto registration and windows registry problem

Post by MaderaLibrary »

I'm using pwb 2.11.4

I'm trying to setup the Auto registration function, and I've found some issues with the way PWB interacts with the windows registry

Here's my settings (X's replace my actual registration key and pass for posting to this forum):
[AutoRegister]
RegisterKey=AXXXXXXX
RegisterPassword=XXXXXXX
RegisterDaysLeft=30
RegisterSeconds=15
RegisterShowWindow=False
UseWindowsRegistry=True
RegisterDelayClose=False
Now the main problem is that when PWB is set to use windows registry, it defaults to trying to modify the HKEY_LOCAL_MACHINE registry tree. On a locked down machine, that key is rarely editable by a non administrative user (usually it only has read permissions for non administrative users). It should be defaulting to use the HKEY_CURRENT_USER tree instead. That tree is basically always modifiable by all users (including non administrative ones).

The second problem is that when I manually inserted the appropriate (albeit expired) keys in the HKEY_CURRENT_USER, PWB still insisted on connecting to the auto registration server to update the key, even though it had a valid place already created to store the key.

My suggestion would be to either offer
A) change to just default to using the HKEY_CURRENT_USER tree to write the updated registration info to. From what I understand of PWB configuration, this tree has precedence over the other tree and the ini file anyway.
B) or an option in the INI file to specify if it writes the auto update registration info in the HKCU or HKLM registry trees. I can't think of a situation in which one would want to use the HKLM tree and modify its permissions instead of using HKCU on a locked down non adminstrative account, but perhaps someone has a setup out there that needs that option.
C) Or even a far more complicated solution. Check to see if keys are present and/or check to see if keys have appropriate permission and/or check to see if keys are written successfully after the attempt and then after one or more of those steps, decide on where to store the registration key.

I have a feeling that because of this, your auto registration server may currently be getting more hits than it should, since the behavior of PWB in the case where PWB.INI is read only and it doesn't have permission to modify the appropriate HKLM keys, is to continually get the updated registration number every time PWB starts
:)

Thanks you for your continued support of such a great product! It makes lives at public libraries so much easier.

Scott
Site Admin
Site Admin
Posts: 2528
Joined: Mon Dec 16, 2002 12:31 pm
Location: Rochester, MN
Contact:

Post by Scott »

Thank you for the well thought out and articulated explanation, it makes it so much easier to offer a correction.

PWB version 2.11.7 (July 6, 2012), now available on the Downloads page has the following change.

Changed [AutoRegister]UseWindowsRegistry=True to write to HKEY_CURRENT_USER

Please let me know if we can make PWB better meet your needs.

--Scott

MaderaLibrary
Observer
Observer
Posts: 4
Joined: Wed Jul 04, 2012 4:00 pm

Post by MaderaLibrary »

Awesome PWB support!

Two days from bug report to patching it and releasing a fixed version!

Post Reply