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 with the desktop and therefore get
the System.Diagnostics.Process.Responding of an app. But if I set it as a
System account that interacts with the desktop I have all sorts of security
issues.
I frigged the Type field within the Services registry entry which now shows
that it can interact with the desktop but it still refuses to play. Anyone
else come up against anything like this?
Cheers
--
Ian Frawley 6 1926
Ian,
I would not ever have a service that interacts with a desktop. It just
doesn't make sense. The reason for this is that there might not always be a
user logged in, but the service will always be running.
What you should do is have an application that communicates with the
service (using some mechanism, remoting, pipes, etc, etc). This will allow
you to run the service under any account you like, and allow it to interact
with the desktop (through a layer of indirection).
Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com
"Ian Frawley" <ch****@away.com> wrote in message
news:ub**************@TK2MSFTNGP12.phx.gbl... 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 with the desktop and therefore
get the System.Diagnostics.Process.Responding of an app. But if I set it as a System account that interacts with the desktop I have all sorts of
security issues.
I frigged the Type field within the Services registry entry which now
shows that it can interact with the desktop but it still refuses to play. Anyone else come up against anything like this?
Cheers
-- Ian Frawley
Hi Nicholas,
Yeah I see what you mean. However the majority of the apps being monitored
will be running as processes on remote machines and will definatley be
logged on to the desktop. This means that even if the service is able to
interact with the desktop it probably means that it won't be able to on a
remote machine anyway. Hmmmmmm this seems to have become the fly in the
ointment and bust me design.
Damn
"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard.caspershouse.com> wrote in
message news:ew**************@TK2MSFTNGP11.phx.gbl... Ian,
I would not ever have a service that interacts with a desktop. It
just doesn't make sense. The reason for this is that there might not always be
a user logged in, but the service will always be running.
What you should do is have an application that communicates with the service (using some mechanism, remoting, pipes, etc, etc). This will
allow you to run the service under any account you like, and allow it to
interact with the desktop (through a layer of indirection).
Hope this helps.
-- - Nicholas Paldino [.NET/C# MVP] - mv*@spam.guard.caspershouse.com
"Ian Frawley" <ch****@away.com> wrote in message news:ub**************@TK2MSFTNGP12.phx.gbl... 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 with the desktop and therefore get the System.Diagnostics.Process.Responding of an app. But if I set it as
a System account that interacts with the desktop I have all sorts of security issues.
I frigged the Type field within the Services registry entry which now shows that it can interact with the desktop but it still refuses to play.
Anyone else come up against anything like this?
Cheers
-- Ian Frawley
Ian,
I am surprized that the Process class can not monitor the local
processes if it is not interactive with the desktop. Are you sure this is
the case?
Also, even if you can't interact with the desktop, you should still see
information about remote services (since you can't interact with their
desktops).
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com
"Ian Frawley" <ch****@away.com> wrote in message
news:uw*************@tk2msftngp13.phx.gbl... Hi Nicholas,
Yeah I see what you mean. However the majority of the apps being monitored will be running as processes on remote machines and will definatley be logged on to the desktop. This means that even if the service is able to interact with the desktop it probably means that it won't be able to on a remote machine anyway. Hmmmmmm this seems to have become the fly in the ointment and bust me design.
Damn
"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard.caspershouse.com> wrote
in message news:ew**************@TK2MSFTNGP11.phx.gbl... Ian,
I would not ever have a service that interacts with a desktop. It just doesn't make sense. The reason for this is that there might not always
be a user logged in, but the service will always be running.
What you should do is have an application that communicates with the service (using some mechanism, remoting, pipes, etc, etc). This will allow you to run the service under any account you like, and allow it to interact with the desktop (through a layer of indirection).
Hope this helps.
-- - Nicholas Paldino [.NET/C# MVP] - mv*@spam.guard.caspershouse.com
"Ian Frawley" <ch****@away.com> wrote in message news:ub**************@TK2MSFTNGP12.phx.gbl... 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 with the desktop and
therefore get the System.Diagnostics.Process.Responding of an app. But if I set it
as a System account that interacts with the desktop I have all sorts of security issues.
I frigged the Type field within the Services registry entry which now shows that it can interact with the desktop but it still refuses to play. Anyone else come up against anything like this?
Cheers
-- Ian Frawley
Nick,
I have tested the Process class and it always returns true when running as a
service that doesn't interact with the desktop. I dun know why it just does.
I am going to see if there are any WMI classes that I can use instead.
Cheers
Ian Ian,
I am surprized that the Process class can not monitor the local processes if it is not interactive with the desktop. Are you sure this is the case?
Also, even if you can't interact with the desktop, you should still
see information about remote services (since you can't interact with their desktops).
-- - Nicholas Paldino [.NET/C# MVP] - mv*@spam.guard.caspershouse.com
"Ian Frawley" <ch****@away.com> wrote in message news:uw*************@tk2msftngp13.phx.gbl... Hi Nicholas,
Yeah I see what you mean. However the majority of the apps being
monitored will be running as processes on remote machines and will definatley be logged on to the desktop. This means that even if the service is able to interact with the desktop it probably means that it won't be able to on
a remote machine anyway. Hmmmmmm this seems to have become the fly in the ointment and bust me design.
Damn
"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard.caspershouse.com> wrote in message news:ew**************@TK2MSFTNGP11.phx.gbl... Ian,
I would not ever have a service that interacts with a desktop. It just doesn't make sense. The reason for this is that there might not
always be a user logged in, but the service will always be running.
What you should do is have an application that communicates with
the service (using some mechanism, remoting, pipes, etc, etc). This will allow you to run the service under any account you like, and allow it to interact with the desktop (through a layer of indirection).
Hope this helps.
-- - Nicholas Paldino [.NET/C# MVP] - mv*@spam.guard.caspershouse.com
"Ian Frawley" <ch****@away.com> wrote in message news:ub**************@TK2MSFTNGP12.phx.gbl... > 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 with the desktop and therefore get > the System.Diagnostics.Process.Responding of an app. But if I set it as a > System account that interacts with the desktop I have all sorts of security > issues. > > I frigged the Type field within the Services registry entry which
now shows > that it can interact with the desktop but it still refuses to play.
Anyone > else come up against anything like this? > > Cheers > > -- > Ian Frawley > >
Ian,
You should be able to use the Win32_Process class as an alternative.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com
"Ian Frawley" <ch****@away.com> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl... Nick,
I have tested the Process class and it always returns true when running as
a service that doesn't interact with the desktop. I dun know why it just
does. I am going to see if there are any WMI classes that I can use instead.
Cheers
Ian
Ian,
I am surprized that the Process class can not monitor the local processes if it is not interactive with the desktop. Are you sure this
is the case?
Also, even if you can't interact with the desktop, you should still see information about remote services (since you can't interact with their desktops).
-- - Nicholas Paldino [.NET/C# MVP] - mv*@spam.guard.caspershouse.com
"Ian Frawley" <ch****@away.com> wrote in message news:uw*************@tk2msftngp13.phx.gbl... Hi Nicholas,
Yeah I see what you mean. However the majority of the apps being monitored will be running as processes on remote machines and will definatley be logged on to the desktop. This means that even if the service is able
to interact with the desktop it probably means that it won't be able to
on a remote machine anyway. Hmmmmmm this seems to have become the fly in
the ointment and bust me design.
Damn
"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard.caspershouse.com>
wrote in message news:ew**************@TK2MSFTNGP11.phx.gbl... > Ian, > > I would not ever have a service that interacts with a desktop.
It just > doesn't make sense. The reason for this is that there might not
always be a > user logged in, but the service will always be running. > > What you should do is have an application that communicates with the > service (using some mechanism, remoting, pipes, etc, etc). This
will allow > you to run the service under any account you like, and allow it to interact > with the desktop (through a layer of indirection). > > Hope this helps. > > > -- > - Nicholas Paldino [.NET/C# MVP] > - mv*@spam.guard.caspershouse.com > > "Ian Frawley" <ch****@away.com> wrote in message > news:ub**************@TK2MSFTNGP12.phx.gbl... > > 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 with the desktop and therefore > get > > the System.Diagnostics.Process.Responding of an app. But if I set
it as a > > System account that interacts with the desktop I have all sorts of > security > > issues. > > > > I frigged the Type field within the Services registry entry which now > shows > > that it can interact with the desktop but it still refuses to
play. Anyone > > else come up against anything like this? > > > > Cheers > > > > -- > > Ian Frawley > > > > > >
Yeah I have been looking at that as I collect other Process metrics from
that class. I am also looking at using Event Traces.
Cheers
"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard.caspershouse.com> wrote in
message news:OX**************@TK2MSFTNGP09.phx.gbl... Ian,
You should be able to use the Win32_Process class as an alternative.
-- - Nicholas Paldino [.NET/C# MVP] - mv*@spam.guard.caspershouse.com
"Ian Frawley" <ch****@away.com> wrote in message news:%2****************@TK2MSFTNGP10.phx.gbl... Nick,
I have tested the Process class and it always returns true when running
as a service that doesn't interact with the desktop. I dun know why it just does. I am going to see if there are any WMI classes that I can use instead.
Cheers
Ian
Ian,
I am surprized that the Process class can not monitor the local processes if it is not interactive with the desktop. Are you sure
this is the case?
Also, even if you can't interact with the desktop, you should
still see information about remote services (since you can't interact with their desktops).
-- - Nicholas Paldino [.NET/C# MVP] - mv*@spam.guard.caspershouse.com
"Ian Frawley" <ch****@away.com> wrote in message news:uw*************@tk2msftngp13.phx.gbl... > Hi Nicholas, > > Yeah I see what you mean. However the majority of the apps being monitored > will be running as processes on remote machines and will definatley
be > logged on to the desktop. This means that even if the service is
able to > interact with the desktop it probably means that it won't be able to on a > remote machine anyway. Hmmmmmm this seems to have become the fly in the > ointment and bust me design. > > Damn > > "Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard.caspershouse.com> wrote in > message news:ew**************@TK2MSFTNGP11.phx.gbl... > > Ian, > > > > I would not ever have a service that interacts with a desktop. It > just > > doesn't make sense. The reason for this is that there might not always be > a > > user logged in, but the service will always be running. > > > > What you should do is have an application that communicates
with the > > service (using some mechanism, remoting, pipes, etc, etc). This will > allow > > you to run the service under any account you like, and allow it to > interact > > with the desktop (through a layer of indirection). > > > > Hope this helps. > > > > > > -- > > - Nicholas Paldino [.NET/C# MVP] > > - mv*@spam.guard.caspershouse.com > > > > "Ian Frawley" <ch****@away.com> wrote in message > > news:ub**************@TK2MSFTNGP12.phx.gbl... > > > 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 with the desktop and therefore > > get > > > the System.Diagnostics.Process.Responding of an app. But if I
set it as > a > > > System account that interacts with the desktop I have all sorts
of > > security > > > issues. > > > > > > I frigged the Type field within the Services registry entry
which now > > shows > > > that it can interact with the desktop but it still refuses to play. > Anyone > > > else come up against anything like this? > > > > > > Cheers > > > > > > -- > > > Ian Frawley > > > > > > > > > > > >
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Glenn Venzke |
last post by:
I'd like to write a windows service. Unfortunately, my company would only spring for the standard edition of VB.NET which doesn't support the creation of windows services. Is it possible to write one...
|
by: Michael |
last post by:
Hi,
I have a windows service developed using c# and it needs to lunch another
windows application. I have been trying to use Process class to do it but the
problem is becase windows service...
|
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: Bijesh |
last post by:
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...
|
by: Andrew |
last post by:
Hey all,
Requesting help from the VB.Net gurus in here. I was given a task to write
a Windows Service (VB.Net) that would run an external program, and if that
program closed for any reason...
|
by: Saran |
last post by:
I have a windows service which instantiates the Powerpoint Application using
PIA. When I am running this windows service am not able to open the Microsoft
powerpoint application. This problem...
|
by: pisquem |
last post by:
I am building an windows service that is to be deployed on a windows
server 2003 and I want to have activity written to the event log, I
want its own log called ('CustomLog')
Below is what I...
|
by: illegal.prime |
last post by:
Hi all, I have a service that needs to start a regular windows
application.
I'm running the service as ServiceAccount.LocalSystem.
But, when it starts the process (using Process.Start) the GUI...
|
by: Yasir Zaheer |
last post by:
I have made a windows service which is configured to start
automatically at the system startup under the USER account type. The
service is working perfectly fine when I try to start it manually,...
|
by: CloudSolutions |
last post by:
Introduction:
For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
|
by: Faith0G |
last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
|
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...
|
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,...
|
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$) {
}
...
|
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...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
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...
|
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...
| |