Mohit Deshpande
Mohit Deshpande

Reputation: 55247

Tell application to automatically uninstall?

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...

Upvotes: 0

Views: 411

Answers (3)

pestilence669
pestilence669

Reputation: 5699

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.

Upvotes: 0

dkackman
dkackman

Reputation: 15579

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)

Upvotes: 0

Otávio Décio
Otávio Décio

Reputation: 74290

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.

Upvotes: 4

Related Questions