Self delete
-
Hi I have developed a program in C++ and I would now like to implement a sort of uninstall function which will delete all the files created so far by the application, including the application itself. How can I do it, since the application can't delete itself if it is still running? Any advice please! jEDI
actually, it can, as the program is loaded in memory when it runs...
[VisualCalc][Binary Guide][CommDialogs] | [Forums Guidelines]
-
Hi I have developed a program in C++ and I would now like to implement a sort of uninstall function which will delete all the files created so far by the application, including the application itself. How can I do it, since the application can't delete itself if it is still running? Any advice please! jEDI
-
actually, it can, as the program is loaded in memory when it runs...
[VisualCalc][Binary Guide][CommDialogs] | [Forums Guidelines]
toxcct wrote:
actually, it can
Actually, no, as the exe is locked. Windows handles this different from Linux. ;)
Though I speak with the tongues of men and of angels, and have not money, I am become as a sounding brass, or a tinkling cymbal.
George Orwell, "Keep the Aspidistra Flying", Opening words -
Hi I have developed a program in C++ and I would now like to implement a sort of uninstall function which will delete all the files created so far by the application, including the application itself. How can I do it, since the application can't delete itself if it is still running? Any advice please! jEDI
J_E_D_I wrote:
I would now like to implement a sort of uninstall function
Do you need an Installer? Try NSIS[^]. Its free.
Though I speak with the tongues of men and of angels, and have not money, I am become as a sounding brass, or a tinkling cymbal.
George Orwell, "Keep the Aspidistra Flying", Opening words -
keep the track of all the files crested by ur application To kill ur exe use ExitProcess() when u dont require it
never say die
-
J_E_D_I wrote:
I would now like to implement a sort of uninstall function
Do you need an Installer? Try NSIS[^]. Its free.
Though I speak with the tongues of men and of angels, and have not money, I am become as a sounding brass, or a tinkling cymbal.
George Orwell, "Keep the Aspidistra Flying", Opening words -
toxcct wrote:
Inno Setup
But that need scripting in Pascal! X| ;)
Though I speak with the tongues of men and of angels, and have not money, I am become as a sounding brass, or a tinkling cymbal.
George Orwell, "Keep the Aspidistra Flying", Opening words -
Hi I have developed a program in C++ and I would now like to implement a sort of uninstall function which will delete all the files created so far by the application, including the application itself. How can I do it, since the application can't delete itself if it is still running? Any advice please! jEDI
J_E_D_I wrote:
...including the application itself.
See here.
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
-
Hi I have developed a program in C++ and I would now like to implement a sort of uninstall function which will delete all the files created so far by the application, including the application itself. How can I do it, since the application can't delete itself if it is still running? Any advice please! jEDI
-
A simple way is use the key
RunOnce
on the windows registry to delete all files and directoryes. Also you can run abat
file that do this, or, of course, you can run an exe file to do this and delete it after that it ends. :cool:
Russell
-
toxcct wrote:
Inno Setup
But that need scripting in Pascal! X| ;)
Though I speak with the tongues of men and of angels, and have not money, I am become as a sounding brass, or a tinkling cymbal.
George Orwell, "Keep the Aspidistra Flying", Opening wordsjhwurmbach wrote:
But that need scripting in Pascal!
Oh come on, no install program is that complicated for you to not cope with Pascal for a few lines...
Don't follow any man spiritually, don't do anything that will get you in sh*t if god is real - Bradml[^]