Click here to Skip to main content
15,886,873 members
Please Sign up or sign in to vote.
1.00/5 (3 votes)
See more:
I hope that brotherhood programmers to answer question No. Bsra as possible to Osmanm
First question:
Sarirenmbr is how the project is designed to operate a pilot program and then after 30 days undermines Alsarirenmbr request from the user. In two ways which
1 - by declining in the days of the time of installation in the computer
2 - through the time and date
Thank you very much and appreciation

Note the work to be in your registry by the language C #. Net
Posted
Comments
Reiss 16-Nov-11 11:31am    
I'm sorry but I don't have a clue what you are asking - please use the improve question to explain your issue.

1 solution

Herez the sample code reads, increments, and then writes a DWORD value to HKEY_CURRENT_USER:

VB
Imports Microsoft.Win32
Dim regVersion As RegistryKey
regVersion =
Registry.CurrentUser.OpenSubKey("SOFTWARE\\Microsoft\\TestApp\\1.0", True)
If regVersion Is Nothing Then
    ' Key doesn't exist; create it.
    regVersion =
Registry.CurrentUser.CreateSubKey("SOFTWARE\\Microsoft\\TestApp\\1.0")
End If

Dim intVersion As Integer = 0
If (Not regVersion Is Nothing) Then
    intVersion = regVersion.GetValue("Version", 0)
    intVersion = intVersion + 1
    regVersion.SetValue("Version", intVersion)
    regVersion.Close()
End If
 
Share this answer
 
Comments
Richard MacCutchan 16-Nov-11 11:54am    
You did notice that OP asked for C# code?
Reiss 16-Nov-11 14:06pm    
that's the only bit I understood

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900