question

ahmedsalah-1628 avatar image
0 Votes"
ahmedsalah-1628 asked karenpayneoregon answered

How to detect when client delete license file desktop app ?

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

dotnet-csharpwindows-forms
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

karenpayneoregon avatar image
0 Votes"
karenpayneoregon answered

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");
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.