I use another way.
in main program I execute other program (update) with parameters in form.close procedure.
in parameters I show what I want to do with update program.
update program rename old version to new filename oldfilename+formatdatetime(...)+.exe
later update program download from internet (way to file there are in parameters) newest programm and write it to own place.