Re: Executing an application inside a Service
From: Nicholas Paldino [.NET/C# MVP] (mvp_at_spam.guard.caspershouse.com)
Date: 12/01/04
- Next message: Mythran: "Re: Set Crystal Report Namespace"
- Previous message: Hayato Iriumi: "RE: Check Memory"
- In reply to: Chakkaradeep: "Re: Executing an application inside a Service"
- Next in thread: Chakkaradeep: "Re: Executing an application inside a Service"
- Messages sorted by: [ date ] [ thread ]
Date: Wed, 1 Dec 2004 12:48:17 -0500
Chakkaradeep,
In this case, you can't do this from a service. How are you going to
control the app from the service if it requires a UI? Also, the interaction
with the desktop is an issue as well. I would find another way to do what
you are doing (perhaps accessing a library that performs the same
functionality).
--
- Nicholas Paldino [.NET/C# MVP]
- mvp@spam.guard.caspershouse.com
"Chakkaradeep" <Chakkaradeep@discussions.microsoft.com> wrote in message
news:743FC010-B893-47FD-8954-0F937B70745F@microsoft.com...
> Hi,
>
> My application which to be made run by my Service is a GUI application say
> "somename.exe",service has to just make it run....for this also i need to
> spawn a thread???
>
> with regards,
> C.C.Chakkaradeep
>
> "Nicholas Paldino [.NET/C# MVP]" wrote:
>
>> Chakkaradeep,
>>
>> Does the account that the service is running under have the
>> appropriate
>> permissions? Does the application you are running have a UI, or is it a
>> console app?
>>
>> --
>> - Nicholas Paldino [.NET/C# MVP]
>> - mvp@spam.guard.caspershouse.com
>>
>> "Chakkaradeep" <Chakkaradeep@discussions.microsoft.com> wrote in message
>> news:7D37DC29-255F-4FEA-B1B0-D62F64FAFCCE@microsoft.com...
>> > Hi,
>> >
>> > My Service is a Multithreaded Server which listens for connections at a
>> > particular port....if any incoming connections come,the server accepts
>> > it
>> > and
>> > starts an application with the parameter got from remote end by
>> > receiving
>> > the
>> > informations from Socket....this is what i want to do...i have
>> > developed a
>> > Multithreaded Server runnning as service,it is working fine by sending
>> > back
>> > replies to clients....but am not able to execute an application....
>> >
>> > so what is my next step??...am a newbie to Services...
>> >
>> > with regards,
>> > C.C.Chakkaradeep
>> >
>> > "Nicholas Paldino [.NET/C# MVP]" wrote:
>> >
>> >> Chakkaradeep,
>> >>
>> >> What's happening when you run it? Running another program from
>> >> inside a
>> >> service isn't the best idea in the world, especially if it has a UI.
>> >> If
>> >> it
>> >> has a UI, then you have to let the service interact with the desktop,
>> >> and
>> >> even then, you can't guarantee that there will be a desktop session
>> >> (there
>> >> is none if no one is logged in).
>> >>
>> >> What are you trying to do?
>> >>
>> >>
>> >> --
>> >> - Nicholas Paldino [.NET/C# MVP]
>> >> - mvp@spam.guard.caspershouse.com
>> >>
>> >> "Chakkaradeep" <Chakkaradeep@discussions.microsoft.com> wrote in
>> >> message
>> >> news:D45C58E9-5B5E-4DBF-BBAD-8C8D2E2BDF75@microsoft.com...
>> >> > Hi all,
>> >> >
>> >> > i have written a Service,now i want to execute another application
>> >> > (for
>> >> > eg;calc.exe) in the service....how will i perform it??...
>> >> >
>> >> > i tried using this....
>> >> >
>> >> > /**************Executing a Process code starts here**************/
>> >> > System.Diagnostics.Process proc = new System.Diagnostics.Process();
>> >> > proc.EnableRaisingEvents=false;
>> >> > proc.StartInfo.FileName="calc";
>> >> > proc.Start();
>> >> > /**************Executing a Process code ends here**************/
>> >> >
>> >> > the above code is not working.......what is the other alternative or
>> >> > is
>> >> > my
>> >> > approach wrong??...
>> >> >
>> >> > with regards,
>> >> > C.C.Chakkaradeep
>> >>
>> >>
>> >>
>>
>>
>>
- Next message: Mythran: "Re: Set Crystal Report Namespace"
- Previous message: Hayato Iriumi: "RE: Check Memory"
- In reply to: Chakkaradeep: "Re: Executing an application inside a Service"
- Next in thread: Chakkaradeep: "Re: Executing an application inside a Service"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|
|