Link to home
Start Free TrialLog in
Avatar of screebar
screebar

asked on

creating a registry entry using vb6

I would like to make an entry in HKEY_LOCAL_MACHINE but in a directory (section) I specify "MyCompany\MyPackage" and finally my key "Registration Code"
So that the result would store my "Registration Code" key and value in the following area.
HKEY_LOCAL_MACHINE\MyCompany\MyPackage\

Also, currently I am storing this registration code simply in
HKEY_LOCAL_MACHINE
However, sometimes the value/key gets erased, is there a better place to store this value.  Could this area change by loggin on as someone else or what should I look for?
Avatar of Chimo
Chimo

You have to use windows API to read/write anywere you want in the registry.

You can look here to find a list of API you may use and code example that read and write to regitry:
http://www.mvps.org/vbnet/api/_api/apir.htm
Avatar of screebar

ASKER

I am currently using "RegCreateKey" however it does not create my "subdirectories" or sections below HKEY_LOCAL_MACHINE
-->>>  MyCompany\MyPackage    <<<<<----
That is what is not happening and I cannot find where you can add these.
I am currently using "RegCreateKey" however it does not create my "subdirectories" or sections below HKEY_LOCAL_MACHINE
-->>>  MyCompany\MyPackage    <<<<<----
That is what is not happening and I cannot find where you can add these.
ASKER CERTIFIED SOLUTION
Avatar of Chimo
Chimo

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Ok, your previous link looks like there is some info, it is not "spoon feeding me" thought ;).  I will tinker with it tomorrow.  Thanks for the help, once I succeed I will award the points.  Any more "spoon feeding" would be appreciated!
Hi screebar,
This old question (QID 20559321) needs to be finalized -- accept an answer, split points, or get a refund.  Please see http://www.cityofangels.com/Experts/Closing.htm for information and options.
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:

-->Accept Chimo's comments as answer

Please leave any comments here within the next seven days.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

GPrentice00
EE Cleanup Volunteer