|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
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 ProcessStartInfo, myProcess As Process sinfo.FileName = "c:\test.txt" myProcess = Process.Start(sInfo) ----------- 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.xls" 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 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 Show quoteHide quote <Buc> schreef in bericht news:u1AV$AdTGHA.5108@TK2MSFTNGP09.phx.gbl... >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 ProcessStartInfo, myProcess As Process > sinfo.FileName = "c:\test.txt" > myProcess = Process.Start(sInfo) > ----------- 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.xls" > 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 > > > > 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.
Best Practices - Coding Convention Question
How to update data in Windows Datagrid DoEvents in VB.NET Committing Byte Array to Disk drag / drop list view items from two list views How to pass an object between forms. MouseUp event fires randomly on Listview encryption Create a new dataset from a dataview Dirty value of datagridview cell |
|||||||||||||||||||||||