New Version of Application
-
I am writting a PC-POS program that runs 24 hours a day (hopefully). At some point during the night it sends to a designated master PC the sales data for that day. During this time period I would like to check if a later version of the application is waiting to be copied from the master PC. If I use the CopyFile() function it fails because the program is running on the PC-POS unit and so cannot overwrite itself. I was thinking about using WININIT.INI or MoveFileEx() with the MOVEFILE_DELAY_UNTIL_REBOOT flag, but I realy do not want to reboot the machines (16 shops with upto 4 PC-POS units in each shop). So how would I go about starting the new version of the application without restarting the machine. Thanks in advance. Joe.
-
I am writting a PC-POS program that runs 24 hours a day (hopefully). At some point during the night it sends to a designated master PC the sales data for that day. During this time period I would like to check if a later version of the application is waiting to be copied from the master PC. If I use the CopyFile() function it fails because the program is running on the PC-POS unit and so cannot overwrite itself. I was thinking about using WININIT.INI or MoveFileEx() with the MOVEFILE_DELAY_UNTIL_REBOOT flag, but I realy do not want to reboot the machines (16 shops with upto 4 PC-POS units in each shop). So how would I go about starting the new version of the application without restarting the machine. Thanks in advance. Joe.
Pretty simple: copy the new version to a temp file - proggy.new - and then start another program to do the copy and exit the first. This other program - copyupdate.exe - would back up the previous exe, rename/move the new one, and start the new exe, and then exit. You could also do this with a little DCOM magic, but the above is the simplest to do and debug.