I’m busy creating an custom uninstall application.
I would like to know how do i delete my application programmaticly after it has run.
I’m using a standard winform app coded in c#
We have an application that uses the clickonce deployment.
Now i wish to create an uninstall function for that.
I do already have the uninstall working fine, however i need to delete the uninstall application as well. it should just be a single exe file that needs to be deleted, after it’s done its thing.
I do not wish to have any remaining file left on the user’s machine
I think that your question is already asked here. You have to use the MoveFileEx API, which, when given a MOVEFILE_DELAY_UNTIL_REBOOT flag, will delete specified file on next system startup.
Here you have a sample: