Returning an error code from a console application.

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Grant Smith

    Returning an error code from a console application.

    OK... I need a simple way to throw an error code to the operating system
    in a VB.NET Console application. Return is not allowed.

    Any ideas?

    Thanks,
    --
    Grant Smith
    A+, Net+, MCP x 2

    Quality Production Liaison
    Hewlett Packard Company

    Database Administrator
    Renaissance Systems and Services, LLC
  • Greg Burns

    #2
    Re: Returning an error code from a console application.

    Will System.Environm ent.ExitCode do what you need?

    Greg

    "Grant Smith" <grant.smith@en vent-tech.com> wrote in message
    news:LZuff.5826 60$xm3.226077@a ttbi_s21...[color=blue]
    > OK... I need a simple way to throw an error code to the operating system
    > in a VB.NET Console application. Return is not allowed.
    >
    > Any ideas?
    >
    > Thanks,
    > --
    > Grant Smith
    > A+, Net+, MCP x 2
    >
    > Quality Production Liaison
    > Hewlett Packard Company
    >
    > Database Administrator
    > Renaissance Systems and Services, LLC[/color]


    Comment

    • Grant Smith

      #3
      Re: Returning an error code from a console application.

      Greg Burns wrote:[color=blue]
      > Will System.Environm ent.ExitCode do what you need?
      >
      > Greg
      >
      > "Grant Smith" <grant.smith@en vent-tech.com> wrote in message
      > news:LZuff.5826 60$xm3.226077@a ttbi_s21...
      >[color=green]
      >>OK... I need a simple way to throw an error code to the operating system
      >>in a VB.NET Console application. Return is not allowed.
      >>
      >>Any ideas?
      >>
      >>Thanks,
      >>--
      >>Grant Smith
      >>A+, Net+, MCP x 2
      >>
      >>Quality Production Liaison
      >>Hewlett Packard Company
      >>
      >>Database Administrator
      >>Renaissance Systems and Services, LLC[/color]
      >
      >
      >[/color]
      I'm not sure. I'll give it a try and let you know.

      --
      Grant Smith
      A+, Net+, MCP x 2

      Quality Production Liaison
      Hewlett Packard Company

      Database Administrator
      Renaissance Systems and Services, LLC

      Comment

      • Herfried K. Wagner [MVP]

        #4
        Re: Returning an error code from a console application.

        "Grant Smith" <grant.smith@en vent-tech.com> schrieb:[color=blue]
        > OK... I need a simple way to throw an error code to the operating system
        > in a VB.NET Console application. Return is not allowed.[/color]

        <URL:http://groups.google.d e/group/microsoft.publi c.dotnet.langua ges.vb/msg/3a6bf0b5f025d3f 1>

        --
        M S Herfried K. Wagner
        M V P <URL:http://dotnet.mvps.org/>
        V B <URL:http://classicvb.org/petition/>

        Comment

        • Grant Smith

          #5
          Re: Returning an error code from a console application.

          Grant Smith wrote:[color=blue]
          > Greg Burns wrote:
          >[color=green]
          >> Snip
          >>[color=darkred]
          >>> Snip[/color]
          >>
          >>
          >>
          >>[/color]
          > Snip[/color]

          Works like a charm, Greg.

          Thanks for the advice.

          Sincerely,
          --
          Grant Smith
          A+, Net+, MCP x 2

          Quality Production Liaison
          Hewlett Packard Company

          Database Administrator
          Renaissance Systems and Services, LLC

          Comment

          • Grant Smith

            #6
            Re: Returning an error code from a console application.

            Herfried K. Wagner [MVP] wrote:[color=blue]
            > "Grant Smith" <grant.smith@en vent-tech.com> schrieb:
            >[color=green]
            >> OK... I need a simple way to throw an error code to the operating
            >> system in a VB.NET Console application. Return is not allowed.[/color]
            >
            >
            > <URL:http://groups.google.d e/group/microsoft.publi c.dotnet.langua ges.vb/msg/3a6bf0b5f025d3f 1>
            >
            >[/color]

            I'm not sure what you're getting at with this. I see the question that
            was posed but I see no answers.

            Thanks, though.

            Sincerely,
            --
            Grant Smith
            A+, Net+, MCP x 2

            Quality Production Liaison
            Hewlett Packard Company

            Database Administrator
            Renaissance Systems and Services, LLC

            Comment

            • Greg Burns

              #7
              Re: Returning an error code from a console application.

              Google Groups is your friend. Although I HATE it's new format. Sometime I
              find it hard to link to correctly myself. Try this link...



              Greg

              "Grant Smith" <grant.smith@en vent-tech.com> wrote in message
              news:UQLff.5618 98$_o.4817@attb i_s71...[color=blue]
              > Herfried K. Wagner [MVP] wrote:[color=green]
              >> "Grant Smith" <grant.smith@en vent-tech.com> schrieb:
              >>[color=darkred]
              >>> OK... I need a simple way to throw an error code to the operating system
              >>> in a VB.NET Console application. Return is not allowed.[/color]
              >>
              >>
              >> <URL:http://groups.google.d e/group/microsoft.publi c.dotnet.langua ges.vb/msg/3a6bf0b5f025d3f 1>[/color]
              >
              > I'm not sure what you're getting at with this. I see the question that was
              > posed but I see no answers.
              >
              > Thanks, though.
              >
              > Sincerely,
              > --
              > Grant Smith
              > A+, Net+, MCP x 2
              >
              > Quality Production Liaison
              > Hewlett Packard Company
              >
              > Database Administrator
              > Renaissance Systems and Services, LLC[/color]


              Comment

              • Grant Smith

                #8
                Re: Returning an error code from a console application.

                Greg Burns wrote:[color=blue]
                > Google Groups is your friend. Although I HATE it's new format. Sometime I
                > find it hard to link to correctly myself. Try this link...
                >
                > http://tinyurl.com/7hydj
                >
                > Greg
                >
                > "Grant Smith" <grant.smith@en vent-tech.com> wrote in message
                > news:UQLff.5618 98$_o.4817@attb i_s71...
                >[color=green]
                >>Herfried K. Wagner [MVP] wrote:
                >>[color=darkred]
                >>>"Grant Smith" <grant.smith@en vent-tech.com> schrieb:
                >>>
                >>>
                >>>>OK... I need a simple way to throw an error code to the operating system
                >>>>in a VB.NET Console application. Return is not allowed.
                >>>
                >>>
                >>><URL:http://groups.google.d e/group/microsoft.publi c.dotnet.langua ges.vb/msg/3a6bf0b5f025d3f 1>[/color]
                >>
                >>I'm not sure what you're getting at with this. I see the question that was
                >>posed but I see no answers.
                >>
                >>Thanks, though.
                >>
                >>Sincerely,
                >>--
                >>Grant Smith
                >>A+, Net+, MCP x 2
                >>
                >>Quality Production Liaison
                >>Hewlett Packard Company
                >>
                >>Database Administrator
                >>Renaissance Systems and Services, LLC[/color]
                >
                >
                >[/color]

                Ah.... Now it makes more sense... LOL. Pretty much the same advice you gave.

                For anyone who is interested, there is also a
                System.Environm ent.Exit(arg) that works as well only it exits the
                application entirely when it is run.

                Thanks again,
                --
                Grant Smith
                A+, Net+, MCP x 2

                Quality Production Liaison
                Hewlett Packard Company

                Database Administrator
                Renaissance Systems and Services, LLC

                Comment

                Working...