tags:

views:

60

answers:

3

This question is for demonstrative purposes. How can I tell my application to uninstall after a certain period of time is over? May or may not be possible. Just wondering...

+4  A: 

This is a recipe for disaster. Users don't like programs that change things against their will. There are lots of solutions out there to expire the software and inform your users of the advantages of purchasing it after the trial period.

Otávio Décio
+1 - making unauthorized changes on a users system could have legal implications in some countries.
slugster
You *might* get away with automatically uninstalling if you make it clear that this will happen when the software is first installed. I know no one really reads the license agreements, so you'd probably need another dialog/wizard page. I wouldn't do it though.
ChrisF
Good point. I was just curious...
Mohit Deshpande
A: 

Assuming you are using windows installer schedule a task in windows task scheduler to execute msiexec /u (your productcode) /q (exact syntax of args may take some tweaking)

dkackman
A: 

Platform would be important to address this adequately.

You could setup a scheduled process (cron on Linux, Windows Scheduler, etc.), to check the date and invoke the uninstall.

I'd suggest that you simply refuse to run after a certain date and put the check in your code... using a license file or some other type of security mechanism.

There are several commercial products that can help you lock down your application. I'd suggest finding and using one, because someone could simply remove your uninstall hook or run a script to "crack" your application in a few minutes. It depends on if you need to uninstall, or if this is simply a deterrent.

Pestilence