Execute step only on failure?

0

Is there a possible way to trigger a step only if previous steps have failed?

For example, I have a package that I need the last step to fire no matter if the previouse steps failed or succeeded. I also don't want to tell the steps to continue on through the rest of the install proccess if their is a failure...

Cancel
login to comment
0

Just off the top of my head, thinking out loud, etc.:

  • Step 4 installs program T in %programfiles%\T\T.exe
  • Step 5 looks for "%programfiles%\T\T.exe" and if it exists, installs program V in %programfiles%\V\V.exe. If it doesn't find it, unlock keyboard and mouse.
  • Step 6 looks for "%programfiles%\V\V.exe" and if it exists, installs program W in %programfiles%\W\W.exe. If it doesn't find it, unlock keyboard and mouse.
  • Step 7 looks for "%programfiles%\W\W.exe" and if it exists, installs program X in %programfiles%\X\X.exe. If it doesn't find it, unlock keyboard and mouse.
  • Step 8 looks for "%programfiles%\X\X.exe" and if it exists, installs program Y in %programfiles%\Y\Y.exe. If it doesn't find it, unlock keyboard and mouse.
  • Step 9 looks for "%programfiles%\Y\Y.exe" and if it exists, installs program Z in %programfiles%\Z\Z.exe. If it doesn't find it, unlock keyboard and mouse.
  • Step 10 Unlock keyboard and mouse.

You'd probably thrown in an exit code at each failed step?

Cancel
login to comment

0

Here is a little more info about what I'm doing, and some example steps.

Step 1: Prompt user to perform install
Step 2: lock keyboard/mouse
Step 3: Display full screen message about update warning not to turn off computer
Step 4-9: performs installation
Step 10: unlock keyboard/mouse and give control back to the user.

 

If step 4 fails, I dont want it to continue the rest of the install steps through step 9, However I do always want to give control back to the user weather the deploy was successful or failed.

as it is now, when the deploy fails, the user never gets back control of the computer.

Cancel
login to comment

0

Pretty much what i'm trying to do is, on failure skip to the last step in the package.

Cancel
login to comment

Reply