Click here to Skip to main content
15,744,193 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
Hi i create one C# windows form project. my app is completely local and have not internet connection.
I want to create an installation file using the following methods, but I have not found a suitable and comprehensive solution for it on the Internet.
how can create setup file base of this 2 option?

What I have tried:

1. I want to create a test and time installation file.
2. I want to create a license for the program so that each license is one time use and unique.
Updated 22-May-23 20:12pm

1 solution

"One time use" and "Unique" is a problem, if you cannot use a connection to a server: if I duplicate the installation program before I install it, or I install it into a virtual machine then there is no way for your app to detect a second copy and refuse to work.

You can tie a particular set of hardware to an installation by using the various serial numbers that can be read, but even then you need an app to read them, send them somehow to you and for you to send back an installation code which is specific to that hardware. And without the internet ... that's going to take time, and be prone to errors both of which will serious annoy clients.
Even then, a VM installation will probably get round that pretty easily.

And ... this is C#. Which means that the EXE file can be easily decompiled to produce pretty good code - so that can be easily changed to disable the licence checking completely. That can be made harder by obfuscation, but that's not impossible to work round if you know how to code.

And then there is the cost: the more effort you put in, the more it costs you to implement. And the more complex the system is to get round, the less reliable it is, and the more it annoys clients. Which means more cost for you in support, and lost customers / more refunds.
You need to estimate how many copies you will sell at what price with and without copy protection and work out where it becomes economically unviable to include it: it's a surprisingly low number in most cases.

Historically, it's only worth it for high cost and low volume software: high volume means "a good challenge" for crackers who will almost certainly disable your protection in a lot less time that it takes to include it!
For example, back before internet based licencing, Adobe had a large team working on copy protection in Photoshop - but on the same day they released a new version there would be a cracked version available!
I have not found a suitable and comprehensive solution for it on the Internet.
And now you know why ...
Share this answer
Member 11400059 24-May-23 1:28am    
So I need reprogramming part of my project. buy host and domain and programming API for read and write the users data each time they want use app? am I right?
OriginalGriff 24-May-23 1:50am    
Depends how much money and effort you are prepared to put into it, as I explained.
Google for "online licencing c#" and you'll find loads of pre-built solutions (most of which cost money but save you work, which also costs money).
OriginalGriff 24-May-23 1:53am    
Bear in mind that nothing to do with security is ever either obvious or cheap - at least if it's actually effective - and that you are providing a financial incentive to "naughty people" to crack your security in the form of "free software vs your price" as well as an "interesting challenge".

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