It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 9 years ago.
I have coded a software which is a windows application in c#.
I wish to create a demo version of my software. How can I use a timer so that the installed software runs for a definate period of time ?
Also is it possible that even if the user machine is formatted, the application wont install after my preset time is exhausted ?
How can I use a timer so that the installed software runs for a
definite period of time ?
You create your own hashing function which generates license key, here one of the components of the key is a final day. So you save that key into a file, and on every start-up check the value present inside it against the actual value of date on PC.
Pro: Easy to implement and put in production
Cons: Easy to hack. Just enough to cheat the DateTime settings of OS.
Another option: you can use some licensing software:
Look here on possible options: Licensing System for .NET
Another again: some web service where you check the data (avoid client side data cheating)
Another again: is limit demo version not on time, but on functionality (limited features are available, you can save data on disk limited amount of time, you can run application limited times... and so on)
Also is it possible that even if the user machine is formatted, the
application wont install after my pre-set time is exhausted ?
no, it's not possible, as formatting means data complete erase.
If you're not going to connect the application to a server-side registration mechanism (which I wouldn't recommend), then you can place a value in the Registry that you use to determine when the trial started. Subtract that value from the current date and time when the application is loaded and you'll be able to determine when it should stop. However, this is not safe from a format or hacking.
My recommended solution is to for server-side registration of the trial software during the first load. This will allow you to ensure that even if they reformatted the drive they couldn't get past the registration. Though this still isn't fool proof because they could register under many aliases, it's at least a lot more trouble. One remaining issue with this idea is what happens if they aren't connected to the internet? Are you going to stop them from using the application? You could couple this idea with the first one and leverage the Registry if they don't have an internet connection.
Either way, preventing people from hacking your registration process is difficult at best. Microsoft has struggled with it since their inception.
Related
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 10 years ago.
I work on C# project.
In first run of my application SQL Server 2008 wants to create a database, and I wanted SQL Server 2008 to create the MDF file in Programs Files. But Windows(XP) doesn't let me (or SQL) create the file and shows "Access is Denied" error.
Where is a safe place to save My MDF file? Is "Application Data" folder a safe place? Do I have permission to make a file in this folder? Or is there a better place to save my file?
I have a solution to your problem. If you are going to develop for a specific target environment, you have to have a measure of control over the environment, or have contacts with people in your organization who do. It's that simple. YOU have to make this happen, one way or the other. You should have identified this in the early analysis and design phases of your project. Someone should have said, where are we deploying code? Where are we deploying the database? Do we have the permissions to do that? If not, who do we talk to that does? How much lead time to we need to make the request so the group XYZ can deliver in time? What management will need to approve this? Do new global groups need to be created. And on and on. The Stack Overflow community cannot answer these questions for you, because we don't know your organization, and environment. YOU DO, or at least you should. Or at least you should know who to ask so that you can know. What kind of development is this, where you, the developer can't copy a file somewhere? Where is your deployment plan? Why haven't you talked to your helpdesk or sys admins? If there are none, then give your admin rights to the PC in question and do as you please. It doesn't really matter where it is, as long as doesn't invite too much scrutiny (like in the root). YOU HAVE TO OWN THIS, or get buy in from those who do control who has access to which directories. Hopefully you will not take this as me jumping on your case, but just trying to give you a real perspective. I have worked for a number of companies, and there are always little fiefdoms, where certain people control certain resources and you have to navigate the maze. But do just that, and get the job done. This is why you are getting so many downvotes. You are overlooking something extremely obvious - instead of looking outward to Stack Overflow, this is something that you should be querying people inside that space where you are trying to deliver. I hope this helps.
All else fails, install SSMS Express and set up the db that way, and use (local)\SQLExpress in your connection string, and kill the mdf option, then uninstall SSMS. A lot of work, but it will get you results. Make a way. Good luck.
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 11 years ago.
I want to create a setup project that in setup time requires serial number to perform installing action and any serial-key can use only in one computer. So, i want all to give me an idea about how to design my setup project ? What things are required to design it ?
Firstly you'll need to come up with an algorithm to generate the keys.
You'll need to decide how to issue the keys. If it's a download only title you could generate the key at the time of purchase.
Once you have a valid key generated you can do one of two things.. Create a key validation algorith, or store the issued keys. Both have their ups and downs.
Upon the user trying to activate the software you'll have to create a machine key of some type. It's up to you what information you base it on but a lot of people would use the computer name, may be store the ip address it's activated from, and some other information that to your requirements fits the bill of the same pc reactivating the software. You can here again generate a unique key based off of this information, sometimes called the activation key.
You'll want the user to be able to reactive the software on the same PC, and most likely a way for them to deactivate it (so should they buy a new computer they can carry the license forward, this is up to you again.)
This is the basics of activating software to a PC. You can integrate this into some setup projects, however there are a lot to choose from and I'd suggest picking one out and seeing what capabilities it already has. Some installers support software activation or at least have a way to add that feature so you may be better off going that route.
Pedro's answer above is also a good start.
If you have custom methods for validating keys then you could create a separate project to handle your own logic and include it in the Setup Project's Custom Actions.
If you are going to leave the capturing of the data to the Setup Project itself you can look here and here. Also, if you're going to have a license agreement you can check this other SO question.
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 11 years ago.
I used C# language in visual studio 2008 and some SQL server management databases in my program
but here in my computer the program runs well but in other Pcs it just can't be run :(
The error is "The application failed initialize property(0Xc0000135). click on OK to terminate the application"
Why this error happens ?
Without more details this answer is virtually impossible to answer. Here are a few things to check/try ...
Run the program on your PC outside of visual studio
Make your database available on the same network your client PCs are on
If this is indeed a networked installation, make sure you can ping the server from your client PCs
Make sure you've enabled remote connections to your database
Make sure your firewall isn't getting in the way of database connections
If you're still experiencing problems you should consider adding logging of some kind to your application (this is a good thing to do regardless of any problems you're experiencing) so you can find out at what point your application is failing. If you are getting error messages, posting those messages here will help us figure out what the problem is much more quickly. Also, if you can, put some code into your question so we can see what it is you're trying to achieve
make sure your database is available on the network, and change to use sql authorization.
You could go to SQL Management Studio on your local PC. Create a public user account or pub account under security and add public and connect permissions to that given user.
If you are on a domain, and want to use Windows Authentication add the user accounts for the Windows Users to that Database Security. Either option will work.
Are you using WinForms or Web App? For Web apps, verify your sh*t in web.config, and make sure your connection string is legit. Make sure you change your authentication to Windows or Forms, based on what you decide to do.
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 11 years ago.
I know this project.The question is that "Can we create a real OS with Managed Code or the os that will create with this project is a hello world os?"
Operating Systems need to have full control on hardware.Can we do it with this one?
If there are any another project please tell me
Cosmos Project
Yes it can be done - see Singularity which is (was) a Microsoft research project to create an entirely managed operating system in "Sing#" (an extended version of "Spec#" which is itself an extension of C#). Its worth stressing that this was just a research project into the concept, and was never intended as a "full" operating system of the likes of Windows or Max OSX.
The source code is available on CodePlex - you can download the code, build it and run it yourself in an emulator (I've done it myself, its well documented and relativley easy although I can't remember the exact steps myself).
Parts of the system were written in assembly / C, specifically the bootloader and the lowest level x86 interupt dispatch code however this is essentially all but unavoidable (it is by its very nature very platform dependant - something needs to write the x86 instructions to control and respond to basic hardware). The low level interrupts are also not particularly interesting in terms of how the operating system actually functions, so I personally don't consider this as cheating the "entirely managed" definition.
Looking on the Wikipedia page for Singularity there are also 5-6 similar projects, including Cosmos and a couple of similar attempts that use Java instead of C#.
The focus of Singularity OS was on security and dependency, however whats also impressive is that according to some basic benchmarks in An Overview of the Singularity Project1 (PDF) the performance of their archetecture was actually comparable to that of other "more conventional" operating systems:
... these numbers demonstrate that architecture that we
proposed not only does not incur a performance penalty, but is often as fast as or faster than more
conventional architecture. In other words, it is a practical basis on which to build a system.
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 11 years ago.
is there any way to make a software , so if the user reinstall windows or format disk drive , the software will run without installing automatically .
I do not mean a software that do not require installation .
think a user install this software , this software automatically run . one day user format hard disk and install a new windows . that software run automatically without installing .
Theoretically yes, but the question to ask is, "where is the executable for this program stored?"
Normally programs are stored on the hard disk, so if the user formats it, the program is gone[*]. So the question is, "where else can code be stored?"
The answer is that, in theory, you can replace the machine's BIOS. This is a very abnormal thing to do, though, it requires all the admin privileges in the world, and the BIOS program can't be very big.
It also can't be written in C# or C++ in the usual Windows-y ways. Firstly the BIOS runs before Windows is running, that's the point. Secondly removing the OS removes the libraries that Windows programs rely on, so if the system drive has been formatted and Windows not re-installed, there's no way to launch Windows and hence no way to start your Windows program.
[*] Boot sector viruses are way out of fashion.
If the user formats his hard drive and powers off his computer, there is no software left on the system that could be run.
No, this cannot be done (unless you re-flash the BIOS).
You can make it portable. Thus you can copy executable on non-system partition and it will still work.
But I dont think there is any way to register this application in fresh windows instalation without modifying the instalation process itself. But registration for autorun is easy and can be done when user first runs application manualy.