C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Reviews   Communities   Interview   Jobs   Projects   Training   Your Ad Here    
Silverlight Games | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Polls | Revenue Sharing | Lobby | Gift Shop |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...






Forums » .NET » Windows »

How to check registred applications


Posted Date: 04 Jul 2009      Posted By: bhakti      Member Level: Gold     Points: 1   Responses: 1



I want to do something like this...
I want to give the facility to register my appication at client machine when he/she run first time.
when it opens 2nd time the appication itself check whether it is registered or not. if not registered the ask for registration and if registered then allow to execute...

now tel me how and where to check for registred appication on local PC






Responses

Author: viji    08 Jul 2009Member Level: SilverRating: 2 out of 52 out of 5     Points: 2

Hi,

When you are running the application for the first time ,you register your application in the registry key.
And when you are running your application further,you just check whether the registry key is available in the registry key and if exist do nothing else create the key.

RegistryKey key = Registry.LocalMachine.OpenSubKey("Software\\TestApplicationRegister");
if (key == null)
{
Registry.LocalMachine.CreateSubKey("Software\\TestApplicationRegister");
}
else
{
//Do Nothing
}


Please rate this answer if it is helpful to you.

Regards,
Viji



Post Reply

 This thread is locked for new responses. Please post your comments and questions as a separate thread.
If required, refer to the URL of this page in your new post.


Next : About special characters
Previous : Convert exe
Return to Discussion Forum
Post New Message
Category: Windows

Related Messages



dotNet Slackers

About Us    Contact Us    Privacy Policy    Terms Of Use