Click here to Skip to main content
15,892,072 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi, I have made a trial version windows application in c#.net. The trial info file is stored in the system folder. Now i want to make that file undeletable because if it is deleted then the user will use my application forever. So is there any way to do this? or how can i detect if the user has deleted that file when application start second time?
Posted

1 solution

XML
static class Program
  {
      /// <summary>
      /// The main entry point for the application.
      /// </summary>
      [STAThread]
      static void Main()
      {
         if (File.Exist(Path))
         {
           .... Checking File  Data....
          Application.EnableVisualStyles();
          Application.SetCompatibleTextRenderingDefault(false);
          Application.Run(new Form1());
         }
      }
  }
 
Share this answer
 

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

  Print Answers RSS
Top Experts
Last 24hrsThis month


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