Relative order of Action in .XML file and files in Temporary

I'm trying to build an updater from the command line using a .XML file so that I can automate my entire build process. My application includes both a Windows service and a database, so when the update occurs I will need to stop the service, run a .SQL file on my database and then start the service.

I know that I can add <Action> elements to the .XML file to stop and start the service, and put a <File> element for the .SQL script in the "temp" dir with an execute attribute of "after", but what's not clear is the precedence of the Action and file execute operations.

Does the "before" action take place before or after the "before" executable in the temp dir? Apologies in advance if it's obvious from the documentation and I've just missed it.

Hey Mary,

The order of executions is like this:

  1. The update is downloaded & extracted
  2. Services are closed (the ones you specify) and wyUpdate checks to see if any other processes are still running.
  3. wyUpdate executes any files you specify to execute before the update has begun.
  4. The update is installed.
  5. wyUpdate executes any files you specify to execute after the update has completed.
  6. Services are started (the ones you specify)
  7. The update has completed.
Does the "before" action take place before or after the "before" executable in the temp dir? Apologies in advance if it's obvious from the documentation and I've just missed it.

The service is stopped first, then the executable you specify is run next.

Does this make sense?

This makes complete sense, and it is how I had hoped it would work. I'm glad to get official confirmation.

Thanks!

I have come up with one glitch in the process, however. Everything is working as it should, except that the start service action is not waiting for my file execute to complete. That's a huge problem for me, as the executable that I'm running is a batch file that installs the service that's supposed to be started.

I can work around it by taking out the start/stop service actions and replacing them with a batch file. I wonder, though, if I'm doing something wrong with my <File> element:

<File source="QueryService.bat" execute="after" startstyle="normal" waitforexit="true" retrollback="false"/>

or if perhaps the <Action> isn't aware of the waitforexit="true" attribute on the <File> element.

I'll look into this.

I can't reproduce this error. Actually, I'm not quite sure what you mean by...

except that the start service actionis not waiting for my file execute to complete.

You mean the execute file isn't being waited for?

I revisited my code and I have found that there was a glitch on my end. The action is in fact waiting for my executable to complete.

Thanks for taking the time to look into it.