Home All Groups Group Topic Archive Search About

Problem running exe in VB.NET

Author
28 Jun 2005 5:27 PM
Dave Harris
I am rather new to VB.NET so please excuse my ignorance. I am trying to
run a program created with QuickBasic but compiled as a standalone program
using a VB.NET frontend. There is a listbox on the main form which has a
list of numbers. The user selects one of those number then clicks a button
to launch the exe. I am using Windows XP Pro. Here is the code that runs
when the button is clicked....

Dim strFlight As String

        Dim strArgu As String

        strFlight = LTrim(CType(lstFlights.SelectedItem, String))

        Dim oProc As New Process

        strArgu = "ah64a1\" & strFlight & "\"

        oProc.Start("f:\testing\llroutec.exe", strArgu)

        'oProc.StartInfo.FileName = "f:\testing\llroutec.exe"





When the button is clicked, you see a command window open then immediately
shut down. The exe runs fine when started in a cmd.exe window using the
following command, "llroutec.exe ah64a1\1015\". Is my code wrong or do you
think the problem may be with Windows? Any help will really be appreciated.
Thanks in advance!!



Dave

Author
28 Jun 2005 7:02 PM
Mitchell Vincent
Dave Harris wrote:
> When the button is clicked, you see a command window open then immediately
> shut down. The exe runs fine when started in a cmd.exe window using the
> following command, "llroutec.exe ah64a1\1015\". Is my code wrong or do you
> think the problem may be with Windows? Any help will really be appreciated.
> Thanks in advance!!
>

Try running something like Notepad.exe to see if it is getting executed
properly.

--
- Mitchell Vincent
- kBilling - Invoices Made Easy!
- http://www.k-billing.com
Author
28 Jun 2005 8:58 PM
Chris Dunaway
When you run the app from the cmd line, what do you normally see?  Does
it do some processing and then exit?  Does it remain on the screen with
menus, etc awaiting further input?

What would you normally expect to see?
Author
29 Jun 2005 12:39 AM
Dave Harris
Using cmd.exe worked. Thanks all for the help!!

Dave
Show quoteHide quote
"Chris Dunaway" <dunaw***@gmail.com> wrote in message
news:1119992312.807013.280860@z14g2000cwz.googlegroups.com...
> When you run the app from the cmd line, what do you normally see?  Does
> it do some processing and then exit?  Does it remain on the screen with
> menus, etc awaiting further input?
>
> What would you normally expect to see?
>