Hi All,
I've developed a Windows Service that acts as a remoting server (.NET
Remoting). The client(user) is able to connect to the server and start a
program by giving the executable path of the program (in the server) along
with the working directory and the arguments (parameters).
This works fine if I try to start programs whose executable file is present
witin the local drives of the server. If the application is in a netwok
drive, the Windows Service is not able to find it.
I found that: if the Windows service is running under the SYSTEM account,
then it won't be able to access the network drives. If the service is running
under the user's account, then it will be able to access the network srives.
No, the problem is: if the service runs under the user's account, the
application that the services starts cannot access the user's desktop. Now,
can anyone please help me to findout how can my windows service access the
user's desktop so that the invoked application can show up it's window to the
user?
Thanks
Bijesh 6 3030
Bijesh,
When you go to the properties of the service, there is a checkbox that
you need to select to allow the service to interact with the desktop.
However, this can be a really bad idea, since it is not always guaranteed
that you will have an interactive login session available (meaning no
desktop to show to).
Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com
"Bijesh" <Bi****@discussions.microsoft.com> wrote in message
news:FB**********************************@microsof t.com... Hi All,
I've developed a Windows Service that acts as a remoting server (.NET Remoting). The client(user) is able to connect to the server and start a program by giving the executable path of the program (in the server) along with the working directory and the arguments (parameters). This works fine if I try to start programs whose executable file is present witin the local drives of the server. If the application is in a netwok drive, the Windows Service is not able to find it. I found that: if the Windows service is running under the SYSTEM account, then it won't be able to access the network drives. If the service is running under the user's account, then it will be able to access the network srives. No, the problem is: if the service runs under the user's account, the application that the services starts cannot access the user's desktop. Now, can anyone please help me to findout how can my windows service access the user's desktop so that the invoked application can show up it's window to the user?
Thanks Bijesh
"Bijesh" <Bi****@discussions.microsoft.com> wrote in message
news:FB**********************************@microsof t.com... Hi All,
I've developed a Windows Service that acts as a remoting server (.NET Remoting). The client(user) is able to connect to the server and start a program by giving the executable path of the program (in the server) along with the working directory and the arguments (parameters). This works fine if I try to start programs whose executable file is present witin the local drives of the server. If the application is in a netwok drive, the Windows Service is not able to find it. I found that: if the Windows service is running under the SYSTEM account, then it won't be able to access the network drives. If the service is running under the user's account, then it will be able to access the network srives. No, the problem is: if the service runs under the user's account, the application that the services starts cannot access the user's desktop. Now, can anyone please help me to findout how can my windows service access the user's desktop so that the invoked application can show up it's window to the user?
Thanks Bijesh
You can't, only SYSTEM can be used to access the Desktop and this is only to
support debugging. Regular Services should not interact with the desktop and
they should not start interactive applications either.
Willy.
"Nicholas Paldino [.NET/C# MVP]" wrote: Bijesh,
When you go to the properties of the service, there is a checkbox that you need to select to allow the service to interact with the desktop. However, this can be a really bad idea, since it is not always guaranteed that you will have an interactive login session available (meaning no desktop to show to).
Hope this helps.
-- - Nicholas Paldino [.NET/C# MVP] - mv*@spam.guard.caspershouse.com
"Bijesh" <Bi****@discussions.microsoft.com> wrote in message news:FB**********************************@microsof t.com... Hi All,
I've developed a Windows Service that acts as a remoting server (.NET Remoting). The client(user) is able to connect to the server and start a program by giving the executable path of the program (in the server) along with the working directory and the arguments (parameters). This works fine if I try to start programs whose executable file is present witin the local drives of the server. If the application is in a netwok drive, the Windows Service is not able to find it. I found that: if the Windows service is running under the SYSTEM account, then it won't be able to access the network drives. If the service is running under the user's account, then it will be able to access the network srives. No, the problem is: if the service runs under the user's account, the application that the services starts cannot access the user's desktop. Now, can anyone please help me to findout how can my windows service access the user's desktop so that the invoked application can show up it's window to the user?
Thanks Bijesh
Hello,
The "Allow service to interact with desktop" option is available only for
system-accounts. But if I use the system-account, I'll not be able to access
the network drives. And in my case, I need to access the network drives.
Thanks You
Bijesh
"Willy Denoyette [MVP]" wrote: "Bijesh" <Bi****@discussions.microsoft.com> wrote in message news:FB**********************************@microsof t.com... Hi All,
I've developed a Windows Service that acts as a remoting server (.NET Remoting). The client(user) is able to connect to the server and start a program by giving the executable path of the program (in the server) along with the working directory and the arguments (parameters). This works fine if I try to start programs whose executable file is present witin the local drives of the server. If the application is in a netwok drive, the Windows Service is not able to find it. I found that: if the Windows service is running under the SYSTEM account, then it won't be able to access the network drives. If the service is running under the user's account, then it will be able to access the network srives. No, the problem is: if the service runs under the user's account, the application that the services starts cannot access the user's desktop. Now, can anyone please help me to findout how can my windows service access the user's desktop so that the invoked application can show up it's window to the user?
Thanks Bijesh
You can't, only SYSTEM can be used to access the Desktop and this is only to support debugging. Regular Services should not interact with the desktop and they should not start interactive applications either.
Willy.
Hello Willy,
So, is there any workaround instead of having a standalone application?
Thank You
Bijesh
Why do you need to start a "Windows" application on the server in the first
place, what if there is no interactice logon or what if there is no
interactice user?
Willy.
"Bijesh" <Bi****@discussions.microsoft.com> wrote in message
news:14**********************************@microsof t.com...
"Willy Denoyette [MVP]" wrote:
"Bijesh" <Bi****@discussions.microsoft.com> wrote in message news:FB**********************************@microsof t.com... > Hi All, > > I've developed a Windows Service that acts as a remoting server (.NET > Remoting). The client(user) is able to connect to the server and start > a > program by giving the executable path of the program (in the server) > along > with the working directory and the arguments (parameters). > This works fine if I try to start programs whose executable file is > present > witin the local drives of the server. If the application is in a netwok > drive, the Windows Service is not able to find it. > I found that: if the Windows service is running under the SYSTEM > account, > then it won't be able to access the network drives. If the service is > running > under the user's account, then it will be able to access the network > srives. > No, the problem is: if the service runs under the user's account, the > application that the services starts cannot access the user's desktop. > Now, > can anyone please help me to findout how can my windows service access > the > user's desktop so that the invoked application can show up it's window > to > the > user? > > Thanks > Bijesh >
You can't, only SYSTEM can be used to access the Desktop and this is only to support debugging. Regular Services should not interact with the desktop and they should not start interactive applications either.
Willy.
Hello Willy,
So, is there any workaround instead of having a standalone application?
Thank You Bijesh
I'm developing a testing env. where the user can start one application on a
remote machine and the get notified when the application quits. And the user
should be able to see the application on the server (in case of any
error/exception etc.). This is the basic usecase.
"Willy Denoyette [MVP]" wrote: Why do you need to start a "Windows" application on the server in the first place, what if there is no interactice logon or what if there is no interactice user?
Willy.
"Bijesh" <Bi****@discussions.microsoft.com> wrote in message news:14**********************************@microsof t.com...
"Willy Denoyette [MVP]" wrote:
"Bijesh" <Bi****@discussions.microsoft.com> wrote in message news:FB**********************************@microsof t.com... > Hi All, > > I've developed a Windows Service that acts as a remoting server (.NET > Remoting). The client(user) is able to connect to the server and start > a > program by giving the executable path of the program (in the server) > along > with the working directory and the arguments (parameters). > This works fine if I try to start programs whose executable file is > present > witin the local drives of the server. If the application is in a netwok > drive, the Windows Service is not able to find it. > I found that: if the Windows service is running under the SYSTEM > account, > then it won't be able to access the network drives. If the service is > running > under the user's account, then it will be able to access the network > srives. > No, the problem is: if the service runs under the user's account, the > application that the services starts cannot access the user's desktop. > Now, > can anyone please help me to findout how can my windows service access > the > user's desktop so that the invoked application can show up it's window > to > the > user? > > Thanks > Bijesh >
You can't, only SYSTEM can be used to access the Desktop and this is only to support debugging. Regular Services should not interact with the desktop and they should not start interactive applications either.
Willy.
Hello Willy,
So, is there any workaround instead of having a standalone application?
Thank You Bijesh
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Lalit |
last post by:
Hi Friends,
I have developed a Windows service. Now i need icon for this service in
systray and context menu fo this icon. Can i do this?
With regards,
Lalit
|
by: Artur Kowalski |
last post by:
I have a NotifyIcon in my Windows Service project and I am trying to
add a ContextMenu to this NotifyIcon or use some of the mouse events.
Everything isn't working. I think so base class of the...
|
by: Ian Frawley |
last post by:
Hello everyone
I have written a Windows Service to monitor local and remote
Processes/Applications. However I am stuck because if it is installed as a
user account I cannot get it to interact...
|
by: Primo |
last post by:
Hi,
This problem has been frustrating me for days and I hope you experts can
help me out. I am trying to run a command, which I would normally run from
the command line, from within my C#...
|
by: Hank |
last post by:
I am writing a windows service in C#.NET which will manage image capturing
devices, when client connects to the service, at some point the service need
to expose a device dialog to the client for...
| |
by: Lubomir |
last post by:
Hi,
I read that interactive windows services will not be allowed to run under
Wista. I would like to ask what exactly is the interactive service. It is
supposed to be a service that communicates...
|
by: Ahmed Perlom |
last post by:
Hi all,
I am trying to start a windows application that has a GUI from a Windows
service written in .NET 2.0. I have been searching on this for few days now
with no avail. When using the...
|
by: pbd22 |
last post by:
Hi.
I know my windows service works when i run it in debug mode on my dev
machine.
It also works in release mode on my dev machine. But, when I move the
service to
a production server, it...
|
by: dm3281 |
last post by:
Hello --
I plan on writing a C# service using VS2005.
If I want my service to have a tray icon, is this typically done from within
my service or do/should I create a controller application and...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
| |
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...
| |