Process p = new Process();
p.StartInfo.WorkingDirectory = Path;
p.StartInfo.FileName = fileName;
p.StartInfo.Arguments =arguments;
p.Start();
p.WaitForExit();
Thank You
Reddy
I think that it's not very good idea to start process from service.
Service works in different context then your app, and can be start before
any user log on.
Try to divide starting app from service, service can inform other user's
app to start you process
R> I am running process.sart to run gpg.exe to encrypt files. It's
R> working fine with console application. When i use same code in
R> windows service. It's not working. It's not even throwing
R> error.Follwoing is the code i am using. Please somebody help me.
R>
R> Process p = new Process();
R> p.StartInfo.WorkingDirectory = Path;
R> p.StartInfo.FileName = fileName;
R> p.StartInfo.Arguments =arguments;
R> p.Start();
R> p.WaitForExit();
R> Thank You
R> Reddy
---
WBR,
Michael Nemtsev :: blog: http://spaces.live.com/laflour
"At times one remains faithful to a cause only because its opponents do not
cease to be insipid." (c) Friedrich Nietzsche
Could you please give some example?
Thanks
reddy
Create small user app that is started when user log on and that will be responsible
for starting new process. Name it like ProcessFactory.
When your service need to start new process just inform it about your ProcessFactory
(via IPC) and your ProcessFactroy will start required process
R> Thanks Michale, I didn't quite get what you said. "Try to divide
R> starting app from service, service can inform other user's app to
R> start you process"
R>
R> Could you please give some example?
R>
R> Thanks
R> reddy
Thank you very much for your responses.
IPC is a general name for such things like Sockets, Pipes, Mailslot, remoting,
dcom, filemapping and etc - everything that imply interaction between processes.
You need to select which way of IPC suites u the best.
I recomend to look there for the samples of IPC http://www.codeproject.com/info/search.asp?cats=3&cats=4&cats=5&cats=6&searchkw=ipc&Submit1=Search&author=&sd=15+Nov+1999&ed=11+Oct+2006
In your case, where only message notification is required, I'd select the
remoting with events
R> Michael,
R> I never used IPC. Is it available in 1.1? If so Could you please
R> tell me
R> how to use IPC.
R> Thank you very much for your responses.
R>
R> "Michael Nemtsev" wrote:
R>