Execute step only on failure?

Comments

3 comments

  • Michael Muni

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

    0
    Comment actions Permalink
  • Michael Muni

    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.

    0
    Comment actions Permalink
  • Brigg Angus

    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?

    0
    Comment actions Permalink

Please sign in to leave a comment.