Announcement

Collapse
No announcement yet.

Losing command line parameter on restart after self update.

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Losing command line parameter on restart after self update.

    Hi,

    I am calling the update client from my application with certain parameters to perform differnt actions. e.g. if i click a download button then an update will be downloaded and if i click install then it will be installed etc.

    But I have noticed that when I call GetServerFile and the client is self updated automatically, on the restart of the application my previous command line parameter is lost. Is there some way of me controlling the restart so I can pass my parameter?

  • #2
    The restart happens internally, you do not have control over the process. You could save the command line parameters (INI file, registry...) and look for this file when the update client (re)starts. Delete the saved data once the client finishes, before it proceeds to the "Server Script".

    Ulrich

    Comment


    • #3
      ok, thanks. I had that as my backup plan.

      Comment


      • #4
        Actually, after testing it seems that the command line parameters are NOT lost over a restart.
        My code was assuming it would be the first parameter, where its location in the list is undefined.
        Solved by a loop.

        Comment

        Working...
        X