Process BUG?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Guest's Avatar

    Process BUG?

    I created a simple test app to start another app and get the process info
    (to see if it has exited).
    Heres my code:
    Dim sinfo As New ProcessStartInf o, myProcess As Process
    sinfo.FileName = "c:\test.tx t"
    myProcess = Process.Start(s Info)
    ----------- works fine, opens in notepad, myProcess has processdata in it.
    However, if I try to open an excel file, the file opens in excel, but
    Process.Start returns Nothing to myProcess.
    sinfo.FileName = "c:\testfile.xl s"
    Does Process.Start only work completly sometimes, or is this a bug?
    I tried it with several kinds of files, .mdb, .doc, all work fine, only
    excel doesn't work.
    tried it on diff machines with same results.
    Any ideas..
    Thanks
    BUC




  • Cor Ligthert [MVP]

    #2
    Re: Process BUG?

    Buc,

    Are you writing in the subject for a bug with this message. Before we write
    about a bug, to keep the newsgroup searchable, we should be sure that it is
    a bug.

    XLS has to be linked to Excel for this. To try if you can click on an excel
    file and than excel opens means the same as what you are doing now.

    The only thing you tell is to start the process that is linked to this file
    extention, which can be everything, however..

    Cor

    <Buc> schreef in bericht news:u1AV$AdTGH A.5108@TK2MSFTN GP09.phx.gbl...[color=blue]
    >I created a simple test app to start another app and get the process info
    >(to see if it has exited).
    > Heres my code:
    > Dim sinfo As New ProcessStartInf o, myProcess As Process
    > sinfo.FileName = "c:\test.tx t"
    > myProcess = Process.Start(s Info)
    > ----------- works fine, opens in notepad, myProcess has processdata in
    > it.
    > However, if I try to open an excel file, the file opens in excel, but
    > Process.Start returns Nothing to myProcess.
    > sinfo.FileName = "c:\testfile.xl s"
    > Does Process.Start only work completly sometimes, or is this a bug?
    > I tried it with several kinds of files, .mdb, .doc, all work fine, only
    > excel doesn't work.
    > tried it on diff machines with same results.
    > Any ideas..
    > Thanks
    > BUC
    >
    >
    >
    >[/color]


    Comment

    • AlanT

      #3
      Re: Process BUG?


      Is Excel already running on your machine at the time; either in
      foreground or background?

      Process.Start only returns something if a new process is started, if an
      existing one is used then it returns nothing.

      hth,
      Alan.

      Comment

      Working...