I understand what you are doing and I do something similar. However, what I want to do is have my program close ( not a problem ) but then execute an operation upon closing which performs the updating, and then restart with the new version of the program.
This is very common with many programs so there must be a rather simple method.