How to detect when client delete license file desktop app ?

ahmed salah 3,126 Reputation points
2021-10-21T01:00:50.083+00:00

I working on desktop application windows desktop made by csharp

I make license file have period of license as 30 day and start date and computer mac address

my issue is clients delete license file so desktop app start as first day after delete this file

so how to prevent users from delete license file

or with another way how to make my app detect that file created before and deleted so can't open my app

Windows Forms
Windows Forms
A set of .NET Framework managed libraries for developing graphical user interfaces.
1,318 questions
C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
6,950 questions
No comments
{count} votes

Accepted answer
  1. Karen Payne MVP 29,236 Reputation points Microsoft MVP
    2021-10-21T01:28:27.06+00:00

    This question has been asked millions of times and my recommendation is to use a paid service.

    If you want to go cheap then write the required file under AppData\Local in a folder you create. The average customer will not find this folder e.g.

    var licenseFile = 
        Path.Combine(Environment.GetFolderPath(
            Environment.SpecialFolder.LocalApplicationData), "Secret", "license.dat");
    
    No comments

0 additional answers

Sort by: Most helpful