Jump to content
  • Advertisement
Sign in to follow this  
Pelikaruga

How to make a program delete itself?

This topic is 4874 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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!

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!