Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: I need to call a success or fail after a program finishes installing  (Read 2920 times)

0 Members and 1 Guest are viewing this topic.

Tazzbr60

    Topic Starter


    Starter

    • Experience: Beginner
    • OS: Windows 7
    is it possible to call a success or fail after installing a program from the .bat file?  Here is a sample of what I have so far:


    @echo off
    @echo Installing Random Filename
    call random file name




    Is there a way to have it report success or fail for that random filename installation?

    Squashman



      Specialist
    • Thanked: 134
    • Experience: Experienced
    • OS: Other
    Re: I need to call a success or fail after a program finishes installing
    « Reply #1 on: August 04, 2015, 08:26:20 AM »
    The program you are calling would have to set an error level after installing.  At which point you can then use the %errorlevel% variable to determine success or failure.

    Tazzbr60

      Topic Starter


      Starter

      • Experience: Beginner
      • OS: Windows 7
      Re: I need to call a success or fail after a program finishes installing
      « Reply #2 on: August 04, 2015, 08:44:04 AM »
      How could I determine if a specifc program would set an error code? Is it program specific? I will be using this to call more than one prigrma for installation if that helps any.

      Squashman



        Specialist
      • Thanked: 134
      • Experience: Experienced
      • OS: Other
      Re: I need to call a success or fail after a program finishes installing
      « Reply #3 on: August 04, 2015, 08:59:03 AM »
      Well I could think of two logical ways to determine that.
      1) Run the program from the batch file and then echo the errorlevel variable to the screen.
      2) Read the manual for the program!

      Tazzbr60

        Topic Starter


        Starter

        • Experience: Beginner
        • OS: Windows 7
        Re: I need to call a success or fail after a program finishes installing
        « Reply #4 on: August 04, 2015, 09:06:10 AM »
        Ok, thanks