When my application is running and I want to do an update, when you press the update button, the application closes and the update begins to check, but if there is an update, and you try to update, sometimes the application is still running in the process list.

When you click on the update button this is whats happening:

Code:
Shell "Update.exe"
Unload Me
Yet the unload me doesn't unload the application, its running in the background.

Apart from the unload me, is there another command I can use to kill the application from running, and also thinking on the same line here, when a user just clicks the big red cross in the top right to kill the application, it too is still sometimes running in the process list.

Any advice would be appreciated, thank you.