How to make a program delete itself?

Started by
5 comments, last by Pelikaruga 18 years, 10 months ago
If I would like to do something like an uninstaller for my game, that would delete first the game and it's files, and then itself/the folder it is in (do uninstall program shortcuts usually just link to another directory like WINDOWS where the actual uninstalling program is in so that it can delete the game directory before deleting itself?), how would I do it? Thanks!
Advertisement
There is a way to unlink the exe from it's own file as it is running, so you could then delete it. I don't remember the specific function, but it's there.
Quote:Original post by Vampyre_Dark
There is a way to unlink the exe from it's own file as it is running, so you could then delete it. I don't remember the specific function, but it's there.


Ah, yes, I must be tired... that sounds very logical. No wonder my idea seemed so wierd. Now I must just find a way to do it like that.

Quote:Original post by Pelikaruga
Quote:Original post by Vampyre_Dark
There is a way to unlink the exe from it's own file as it is running, so you could then delete it. I don't remember the specific function, but it's there.
Ah, yes, I must be tired... that sounds very logical. No wonder my idea seemed so wierd. Now I must just find a way to do it like that.
Somebody here should be able to point you to the correct function, sorry I can't help more with that. Also, you could try using a ready made installer/uninstalller? The winamp team has put out theirs, and it's supposed to be good. clicky
Yes, thank you, but this was more about learning; I have used pre-made installers before... I just wanted to know how they work and how it is accomplished.
Hope this helps you
Yes, thank you very much!

This topic is closed to new replies.

Advertisement