Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Reg-key class
Message
 
General information
Forum:
Visual FoxPro
Category:
Third party products
Title:
Miscellaneous
Thread ID:
00084992
Message ID:
00086486
Views:
36
>>>>I've worked with it when I've need to cull out registry keys when an application fails to remove them in its uninstall process. No, I haven't studied it much beyond that -- I just presumed it was alot of what the .INI files used to be.
>>>
>>>And did you say you like living dangerously? ;)
>>>
>>>Neverminding my humor, it's far too easy to delete or alter a Registry key accidentally, which can make you machine inoperative.
>>>
>>>>Also, maybe I haven't made the connection yet between registration keys and the Registry. I'm guessing that certain aspects of my application that I wish to parameterize (number of messages per month, for example), are actually encoded into the registry via registration keys. If this is the case, what do I use to help establish the code?
>>>
>>>I'm going to be a bit sloppy about this, so bear with me.
>>>
>>>As application programmers, we are usually concerened with what's called the application key. In most Windows apps, an application key is established under
>>>
>>>[HKEY_LOCAL_MACHINE]/Software/Companyname/Productname
>>>
>>>
>>>(note that the structure beyond that seems to be option of the manufacturer). At this point, a given key may be either a variable with a value, or may have more keys in it, or both. As programmers, we may use the Windows API to store and retrieve values into this structure.
>>>
>>>Note that writers of ActiveX objects and other parts of the operating system will be concerned with other parts of the Registry.
>>>
>>>Is that any help?
>>
>>Yes, I believe so. What application can I use to help generate the registration keys, as well as incorporate the "unlock" mechanism within the Setup application, so that only the valid registration keys get generated into the Registry?
>>
>>Also, for multi-operator applications, is it a safe presumption that everyone uses the same registration key when they install the application on their workstations? If that is the case, do you have a recommendation on the best way to "upgrade" an application deployed across a network? (For example, if the original installation was to process only 1500 messages a month across 15 workstations, and the company bought an upgrade so that it can process 4500 messages a month.)
>>
>>Thanks!
>>
>>Ed
>
>Hi Ed,
>
>I seem to have caught the tail end of this thread. If I have got it straight, you want to able to access the registry and be able to set your own key there. The way I have done it in the past is to put stuff into the HKEY_CLASSES_ROOT as a sub-key and have sub-sub keys under it et al. This is where I believe, the class id's of all ActiveX components are written. From what you have mentioned you will need to create your own unique key nomenclature within HKEY_CLASSES_ROOT. That will ensure that all network machines' registry, when accessed by the upgrade, will respond by your key, and not any other.
>
>Look at the WIN32 Help file for the following functions;
>
>RegOpenKey, RegCreateKey, RegQueryValueEx, RegSetValueEx, and RegCloseKey. Simply wrap them around in a VFP class and you're in business.

Thanks! I guess I was hoping there was already a class out and about that did this for me, so all I had to do was implement it within my application and find some way to hook it into the setup routine for installation. Certainly Microsoft and others that implement registration keys for their applications have something.

Ed
Edward Johnson
Previous
Reply
Map
View

Click here to load this message in the networking platform