Create Registry and Read registry
hello every one,
i have created registry in windows when i m created setup. but i don't know how can i read this registry at my software's welcome form . or like main form . i want that when user click software icon on that time registry should be check if it is same values then software Should be open other wise will not open and give to exception to him .hope you understand what i want.
its too urgent
please help me
tahnks in advance

Nilanka DharmadasaPosted Nov 7, 2009, 3:30 AM
I got your requirement. Ill find some good way to achieve that and let you know for sure.
WrithePosted Nov 8, 2009, 12:44 AM
There are a lot of things you need to do including encryption, where to store the encrypted information, will you have an expiry date, will it allow trial versions if so how many days in trial version, will the application work for a single user on a computer or any user on the computer or network.
How will you register the application? will it be done by web server, how? if you use a web server, will you poll the server to see if the registration is a valid one? how will you create the registration key? will it be made up of alpha numeric values like 2FGT5-HRT43-509AQ or just simple stuff like email address and name?
Kirtan PatelPosted Nov 7, 2009, 6:26 AM
as you told you dont want to use registry as its not secure way then you can use encryption in this way you dont need to store any thing anyware as
intelligence will be inbuilt in software logic. :)
to write this code you can make an md5 hash according to an algorithm of your own so every user must have a key related
to lets say his user name and email address that will unlock if the key is typed correctly. lets say if you have a user name
"kirtan" and an email address "[email protected]" you can combine it in an algorithm of your own "simplest one for
example is concatenation: "[email protected]" now encoding md5 hash to it will give a 32 char
"9192ec1632022ab6b3706dc053d7b20f" which forms a serial and this serial can't be decrypted unless you know the
algorithm that it was encrypted first. to make an md5 hash value try this:
string text="[email protected]";
byte []bytes=System.Text.Encoding.Default.GetBytes(text);
byte []md5Bytes=System.Security.Cryptography.MD5.Create().ComputeHash(bytes);
string md5Text=System.Text.Encoding.Default.GetString(md5Bytes);
now use this type of logic in the software :)
if my answer helped you then mark "Do you like this answer" please :)
Kirtan PatelPosted Nov 7, 2009, 5:19 AM
Send me your Requirement too in Mail at [email protected]
i m very good at registry programming :)
Amit ChoudharyPosted Nov 7, 2009, 3:13 AM
The Article is here on c-sharpcorner itself gothrough it. very helpful...
http://www.c-sharpcorner.com/UploadFile/sushmita_kumari/RegistryKeys102082006061720AM/RegistryKeys1.aspx
Hope it helps...
Enjoy Coding....
===================================
Don't forget to mark it as answer if it helps :)
Naeem KhanPosted Nov 7, 2009, 3:12 AM
Nilanka DharmadasaPosted Nov 7, 2009, 3:05 AM
It is possible via Microsoft.win32 namespace.
using Microsoft.Win32;
private void button1_Click(object sender, EventArgs e)
{
//Create
RegistryKey MyReg = Registry.CurrentUser.CreateSubKey("SOFTWARE\\Adobe\\Repair\\xxxx");
}
private void button2_Click(object sender, EventArgs e)
{
//Read
RegistryKey MyReg2 = Registry.CurrentUser.OpenSubKey("SOFTWARE\\Adobe\\Repair\\xxxx");
}
For more info go to this link.It provides a detailed explaination.
http://www.codeproject.com/KB/system/registry1.aspx?msg=812147
Check my answer for your MDI problem too. :)