How To Read And Write Values in Registry

jothis

Active Member
Licensed User
Hi Friends

Is It Possible to Read And Write Values To Registry? if Possible Can you Please Tell Me How it Works?


Please Help me

jothis
:sign0085:
 

jothis

Active Member
Licensed User
Now Iam In A problem

Hi again

I want to know there is a key exist in registry if exist the value of the key is 1 or null.
I dont Know How to Do it Can you Please Tell it?

Help me

jothis
:sign0085:
 

Attachments

  • 1.sbp
    723 bytes · Views: 207

specci48

Well-Known Member
Licensed User
Longtime User
I dont Know How to Do it Can you Please Tell it?

Have you really tried to find it out for yourself?
The attached code is exactly taken from the help file. :confused:

Snip....

I added a small program reading a valid and an invalid value from the registry.


specci48
 

Attachments

  • Registry.sbp
    1.5 KB · Views: 181

jothis

Active Member
Licensed User
Thankyou

Thankyou specci48,

I tried it myself, But It was not working well. That is why I posted my doubt with example.
I tested with your program and now it is working well.

Thank you For Your Help

jothis
 
Last edited:

jothis

Active Member
Licensed User
I got another Problem

HI All,

I want to make a program.
Here I want to know whether the SUB KEY (Myapp) AND KEY (install) are existing in registry.

Because, when I run my program, it will check first the above details are available in registry.
If that details available in registry. My program will run other wise it will pop up an error.

THIS OPTION IS I USED TO PREVENT COPYING MY EXE FILE WITHOUT INSTALLATION

BUT I GOT SOME ERROR "OBJECT REFERENCE CANOT SET TO A INSTANCE OF OBJECT"

I will tell you what is my aim is, if some one run my exe file without install, if there is no registry details, my program will alert an error in message box as "Please install again".
So I should check whether the registry details are available or not.



Can you help me. please
Please Help me?
:sign0085:
jothis
 

Attachments

  • 3.sbp
    1.3 KB · Views: 189
Last edited:

specci48

Well-Known Member
Licensed User
Longtime User
Hi jothis,

you'll get this error because the key ("Software\Myapp") is not available in the registry at all.
In this case you have to handle it for yourself with an ErrorLabel.

If the key is valid but the not valuename you try to read out ("install") you can handle it with the IsNull function.

If the key and valuename are both available you can finally check the value itself.


specci48
 

Attachments

  • 3-new.sbp
    1.6 KB · Views: 191

jothis

Active Member
Licensed User
Hi specci48,

Its working well. Thank you very much for your help.

with thanks,

Jothis
 
Top