Results 1 to 5 of 5

Thread: Returning error code to shell

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Jan 1999
    Location
    India
    Posts
    85
    I have a standard EXE
    I will be running it in command prompt.
    I want my exe to return status to the shell. How can I make my standard exe to pass messages to shell.

    My problem is if there was some problem so that the exe has to stop executing I have to return a message at the command prompt, with the error code returned to the shell.

    How can I do that?

    Thanks
    Ramdas

  2. #2
    Guest
    To write to your App, use the SendKeys Function.

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Jan 1999
    Location
    India
    Posts
    85
    This is a sample Application.
    I have just one module in my application and the application startup object is Main()
    This application is set to unattended execution.

    I created the exe and run at command prompt But I not getting any error message at command prompt.

    I need to get an error message at the command prompt.




    Code:
    Sub Main()
    Dim Arguments
    Arguments = Command()
    If Arguments = "" Then
        Err.Raise 1, "Test application", "No Parameters specified"
    Else
        'do Action
    End If
    End Sub

  4. #4

    Thread Starter
    Lively Member
    Join Date
    Jan 1999
    Location
    India
    Posts
    85
    Can any one help me in this??????

    Have any idea of any API's that can do this???

    Ramdas

  5. #5
    PowerPoster Chris's Avatar
    Join Date
    Jan 1999
    Location
    K-PAX
    Posts
    3,238

    I created the exe and run at command prompt But I not getting any error message at command prompt.
    I need to get an error message at the command prompt.
    I did try your code by double click it at the Windows Explorer and it did raise the error with runtime-error "1":

    So, what do you mean by Command prompt? it is MSDos Command Prompt window? If yes, why you need to run your application as the Command Prompt?



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width