Results 1 to 3 of 3

Thread: process.start timeout

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Nov 1999
    Posts
    1,337

    process.start timeout

    I have this little application that is like a app window. Basically it just has shortcuts that we can click on. I have the below function that runs the shortcut. is there anyway to check for timeout calls? Because every once in awhile a user will get the following error. This particular error was from an IE shortcut so basically it was on the local machine. Other shortcuts point to mapped drives.
    Code:
    <?xml version="1.0" encoding="utf-8"?>
    <Exceptions>
      <Exception>
        <Date_Time>03/11/2013 11:29</Date_Time>
        <Message>This operation returned because the timeout period expired</Message>
        <StackTrace>
       at System.Diagnostics.Process.StartWithShellExecuteEx(ProcessStartInfo startInfo)
       at System.Diagnostics.Process.Start(ProcessStartInfo startInfo)
       at AppWindow.Form1.HyperJump(String p1)
       at AppWindow.Form1.lvFiles_DoubleClick(Object sender, EventArgs e)
       at System.Windows.Forms.ListView.WndProc(Message&amp; m)
       at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
    </StackTrace>
      </Exception>
    </Exceptions>

    Code:
     Private Sub HyperJump(ByVal p1 As String)
           
            Try
                If Not p1 Is Nothing Then
                    Dim myProcess As New Process()
                    Dim myProcessStartInfo As New ProcessStartInfo(p1)
                    myProcess.StartInfo.FileName = p1
                   
                    myProcess.Start()
                    
                End If
    
            Catch ex As Exception
                Debug.WriteLine(ex.Message)
                MsgBox("Timeout Occured" & Chr(13) & Chr(13) & ex.Message & Chr(13), vbOKOnly, "Failed To Start")
            End Try
        End Sub
    Last edited by phpman; Mar 12th, 2013 at 07:16 AM.

  2. #2
    PowerPoster dunfiddlin's Avatar
    Join Date
    Jun 2012
    Posts
    8,245

    Re: process.start timeout

    If the error is occurring when you already have an active Catch, that suggests that it is coming from the external program so there's probably not whole lot can be done about it. Does it crash your program?
    As the 6-dimensional mathematics professor said to the brain surgeon, "It ain't Rocket Science!"

    Reviews: "dunfiddlin likes his DataTables" - jmcilhinney

    Please be aware that whilst I will read private messages (one day!) I am unlikely to reply to anything that does not contain offers of cash, fame or marriage!

  3. #3

    Thread Starter
    Frenzied Member
    Join Date
    Nov 1999
    Posts
    1,337

    Re: process.start timeout

    thanks dunfiddlin, yes, it does crash the program. well I get the error and it closes the app out.

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