473,325 Members | 2,342 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,325 software developers and data experts.

ProcessStart won't start an application within my Programs folder on my web server

347 100+
I'm trying to kick off an application within my Programs folder on my web server with this code:

Expand|Select|Wrap|Line Numbers
  1.   'This subroutine calls the CSV Parser and executes it'
  2.     Private Sub StartCSVParse(ByVal CSVParse As String)
  3.         Dim process As New Diagnostics.Process
  4.  
  5.         With process
  6.  
  7.             With .StartInfo
  8.  
  9.                 .FileName = "ExcelConverter.exe"
  10.  
  11.                 .Arguments = ""
  12.  
  13.                 .WorkingDirectory = "C:\Program Files\Infrahealth Inc\CSVParser\"
  14.  
  15.             End With
  16.             '
  17.             .Start()
  18.  
  19.         End With
  20.         'This Try is to catch if the application throws any kinds of errors'
  21.         Try
  22.         Catch Exc As Exception
  23.             message2.Text = Exc.Message
  24.         End Try
  25.     End Sub
  26.  
and it's not starting the application but I'm also not getting any errors back from the server. I have made sure that the asp.net user has permissions on the folder, and I can run the application on it's own and it runs fine. Does anyone have a suggestion as to why this process start isnt working?

Thank you,

Doug
Aug 5 '10 #1
4 1493
PsychoCoder
465 Expert Mod 256MB
I would put your code inside the Try of your empty Try..Catch block to see if anything is returned from the Catch
Aug 5 '10 #2
dougancil
347 100+
Richard,

I moved the code ... maybe not as much as I should have:

Expand|Select|Wrap|Line Numbers
  1.   Private Sub StartCSVParse(ByVal CSVParse As String)
  2.         Dim process As New Diagnostics.Process
  3.  
  4.         With process
  5.  
  6.             With .StartInfo
  7.  
  8.                 .FileName = "ExcelConverter.exe"
  9.  
  10.                 .Arguments = ""
  11.  
  12.                 .WorkingDirectory = "C:\Program Files\Infrahealth Inc\CSVParser\"
  13.  
  14.             End With
  15.             '
  16.             .Start()
  17.             'This Try is to catch if the application throws any kinds of errors'
  18.             Try
  19.             Catch Exc As Exception
  20.                 message2.Text = Exc.Message
  21.             End Try
  22.         End With 
  23.     End Sub
  24.  
But still nothing. If thats not what you were referencing, please offer me an example.

Thank you

Doug
Aug 6 '10 #3
put all that stuff inside the try catch...the way you have it setup right now, its not going to catch anything
Aug 6 '10 #4
Frinavale
9,735 Expert Mod 8TB
Like this:
Expand|Select|Wrap|Line Numbers
  1. Private Sub StartCSVParse(ByVal CSVParse As String)
  2.  
  3.     Try
  4.         Dim process As New Diagnostics.Process
  5.  
  6.         With process
  7.  
  8.             With .StartInfo
  9.  
  10.                 .FileName = "ExcelConverter.exe"
  11.  
  12.                 .Arguments = ""
  13.  
  14.                 .WorkingDirectory = "C:\Program Files\Infrahealth Inc\CSVParser\"
  15.  
  16.             End With
  17.             '
  18.             .Start()
  19.             'This Try is to catch if the application throws any kinds of errors'
  20.  
  21.             Catch Exc As Exception
  22.                 message2.Text = Exc.Message
  23.             End Try
  24.         End With 
  25.     End Sub
Notice how I put the code that could possible throw an exception in the Try part? If that code throws an exception it will be caught...and the code in the Catch section will be executed.

-Frinny
Aug 9 '10 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Tam | last post by:
Having problems with this code. ProcessStartInfo info = new ProcessStartInfo(); info.FileName = ("mspaint.exe"); info.Arguments = image.getFileName; // returns full path and name...
3
by: _Lars_ | last post by:
Any suggstions on how to play a quicktime movie (i.e .mov) within a c-sharp application? Thank you for the advice.
6
by: Quiet Man | last post by:
Hi all, I'm designing a fairly simple service that will run on W2K/SP4 and W2K3 servers. It's job is to be a very specialized database server that listens on a given IP address / TCP port and...
6
by: pnp | last post by:
Hi all, when I try to run the shell command on winXP Process.Start("net share ....") I get the error that the specified file was not found! Any ideas? Thanks in advance, -pnp
2
by: Jim Heavey | last post by:
Hello, I was wondering if there is some way I can obtain the name of the subroutine that a line of code is executing in via the code. Sy for example you wanted to write a message like the...
6
by: James Radke | last post by:
Hello, I have a multithreaded windows NT service application (vb.net 2003) that I am working on (my first one), which reads a message queue and creates multiple threads to perform the processing...
4
by: Valeria Galvano | last post by:
Hi, when I use the System.Diagnostics.ProcessStart to send to a printer a document that need to be printed, is possible to set a printer that is not the default printer? (see the code below...
5
by: =?Utf-8?B?RkxEYXZlTQ==?= | last post by:
I'm developing an application that gets data from 100 sources (via telnet connections, but you can think stock quotes from a webservice if you like). I was planning on using the thread pool (25...
4
by: mcw.willart | last post by:
Hi, I notice some strange behaviour with Process.start; when I start an mmc-console, e.g. Process.Start("c:\\tools\\AdminConsole.msc"); everything works fine, but when I try to start it with...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.