473,379 Members | 1,174 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,379 software developers and data experts.

System.Diagnostics.Process.Start Freezes

I am using the system.diagnostics.process.start command to launch an
excel template. Once open the user has the option to create a new
template through a wizard I have created. When the wizard finishes it
goes back through the same routine to open the new template. Everything
works fine until it reaches the process.start line of code then it just
freezes. I assume this is because the process (Excel) is already
started. I am looking for a workaround to this, and it does not matter
if I get a new instance of excel or not. I have tries the
process.startinfo.CreateNoWindow as true and false but neither worked.
I am using a vb6 dll that communicates via interop to the wizard which
is written in .net 2003. The wizard works fine to create the first
template and the interop communication is working as well. Any thoughts
will be greatly appreciated.

Sep 26 '06 #1
3 3814

LoDawg wrote:
I am using the system.diagnostics.process.start command to launch an
excel template. Once open the user has the option to create a new
template through a wizard I have created. When the wizard finishes it
goes back through the same routine to open the new template. Everything
works fine until it reaches the process.start line of code then it just
freezes. I assume this is because the process (Excel) is already
started. I am looking for a workaround to this, and it does not matter
if I get a new instance of excel or not. I have tries the
process.startinfo.CreateNoWindow as true and false but neither worked.
I am using a vb6 dll that communicates via interop to the wizard which
is written in .net 2003. The wizard works fine to create the first
template and the interop communication is working as well. Any thoughts
will be greatly appreciated.

Hi,
Please check whether you close / kill the excel instance when you
are done with it. This might hang your program. I also had this problem
with Word. An instance was open already which was associated with my
program. When i again used the same program it used to hang. Then i
killed the instance of the word every time i was done using it, and it
is working fine now.
You can check whether excel.exe is still running when you are done
with it in Task manager.

Hope it helps you !
Thanks !

Sep 26 '06 #2
Thanks for the quick reply coolCoder, but the existing excel workbook
needs to reamain open even after creating the new one.

Sep 26 '06 #3

Just so no one wastes their time anymore I foxed this by opening the
new workbook from the dll instead. I have to pass more info through the
interop than I like as it is slower but it works. So thanks again
coolCoder for you suggestions.

Sep 26 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Daniel Reber | last post by:
I am trying to start a process from a windows service but when the process starts the command window that the process runs in never shows. Is this because I am calling it from a windows service? ...
0
by: marccruz | last post by:
Given an instance of System.Diagnostics.Process, how can I get the parent process o Given an instance of System.Diagnostics.Process, how can I get the child processes For example, I start a...
1
by: solex | last post by:
Hello All, Hopefully someone has run into this error. I have written a class(source below) that launches a thread to monitor the StandardOutput of a System.Diagnostics.Process, in particular I...
2
by: andreas | last post by:
hi, In windows xp in the start launch menu when i put notepad "c:\test.txt" i get notepad with test.txt in it. in vb.net when i state system.diagnostics.process.start("notepad.exe" i get...
11
by: Nurit N | last post by:
This is the third newsgroup that I'm posting my problem. I'm sorry for the multiple posts but the matter becoming urgent. I hope this is the right place for it... I have created a very...
2
by: Daniel | last post by:
System.Diagnostics.Process.Start fails on windows server 2003 the process returns process.ExitCode == 0 but executing any process with System.Diagnostics.Process.Start on windows xp works fine....
0
by: Daniel | last post by:
C# windows service freezes on System.Diagnostics.Process.Start(info) When I launch PSCP from a C# windows service and launch pscp 0.53 there are no issues. but when I use C# windows service to...
0
by: Colin Williams | last post by:
I am using the code below to map network drive and then fire up an app in a sub dir of that drive. However when using the file open dialog from that app, drive K: appears just as Network drive K:...
6
by: kimiraikkonen | last post by:
Hello, I want to ask this: If i do: System.Diagnostics.Process.Start("c:\lame", "--preset standard c:\blabla.wav c:\blabla.mp3") it works. But i don't want this. I want my 2 textboxes must...
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...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

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.