views:

100

answers:

5

Is it possible for a .NET application to leave a trace so that it can be found if the application is re-installed? Of course, a trace that is difficult to be removed.

+1  A: 

Well, generally, if you un-install something, you'd hope it completely removes itself, and doesn't leave a trace of the fact that it was there. Otherwise, if it doesn't, it hasn't really un-installed.

This is language-agnostic anyway.

So the answer is: Yes, but don't do that.

What problem are you really trying to solve?

Noon Silk
Too much second guessing ;)
Alex
I'm trying to prevent the application from being re-installed which would renew its trial period.
Amr
You can use a trial license for that, and activate it over the internet, then check it when they are online, and just expiry it appropriately.
Noon Silk
+2  A: 
  • Create a file
  • Create a registry key
  • Create a global variable
  • A combination of all above

...and then check for existence the next time install is attempted.

While it is better practice to remove applications in their entirety, I assume this is for 'trial' software (one time install) purposes or a similar reason.

Alex
this is usually the way it gets done windows...
Sander Versluys
Yes, this is for trial purposes which is why I want it to be something that is harder to be removed.
Amr
A: 

Many application leave behind traces (eg in registry) to detect previous installation. However tools like RevoUninstaller can be used to completely remove those traces. One easy way of doing so is to send the machine id to your server.

Umair Ahmed
A: 

Look at MsiEnumProducts Function

adatapost
A: 

I've done some Googling to find better information (with no success) but I can remember mention of something referred to as the "Manufacturers Section" of a hard drive, an area which is outside that of normal storage to which it's possible to write information that won't be lost if the drive is re-formatted. The specific product I'm remembering was AutoCAD.

The fact that you are asking for something that is "difficult to be removed" leads me to believe that you are looking for something like this?

It's unlikely that the use of this sort of technology would make you very popular with your customers, particularly with the bad feeling directed towards DRM, rootkits and the like.

Richard