Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Other Discussions
  3. Article Writing
  4. New Version of Application

New Version of Application

Scheduled Pinned Locked Moved Article Writing
salesannouncement
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Offline
    J Offline
    Joe OConnor
    wrote on last edited by
    #1

    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.

    T 1 Reply Last reply
    0
    • J Joe OConnor

      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.

      T Offline
      T Offline
      Todd Wilson
      wrote on last edited by
      #2

      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.

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups