-
I need to design a small app that will display a predetermined HTML file that will delete itself after it is closed.
I need to know how to code an app to delete itself after it is done.
Does anyone have an idea of how to achieve this task?
I appreciate any time or effort,
Daniel Christie
-
you can try outputting the code to delete App.Exe into a vbscript (.vbs) file, execute that and terminate the program. Make sure the vbs pauses long enough for your program to close, or vbs won't be able to delete the file. Make sure the vbs has the instructon to delete itself at the end too. afaik, vbs is loaded into memory, so file is not used, and can be deleted.
I'm not sure of the command to delete a file from vbs.
-
The problem is, you will not be able to delete the program, while it is running, or executing any command. I dont think your answer lies in VB itself. Are you planning on deleting the app using a dos shell ?