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

Use ServiceController for controling remote services.

Hi to all,

i have made a module that can get a list of services running on a
local or remote machine.
So i have machine A that get a list of services of machine B

The way the configuration is at the moment, is that in machine B,
i have create a user account with the same credentials (username/password)
that i was logged in machine A, so when i run the following

ServiceController[] srvC = ServiceController.GetServices(machine);
s = new string[srvC.Length];

i can succesfully get the running services.

But, this module will be running in several computers and i do not
want to make a user account for each of the other users in machine B.

My question is,
how i can use the code snippet above and have to
login (somehow) with a standard user credentials that i create once
in machine B and then, if succesfull, i can get the list of running services
?
Thanks a lot of any help

anthonyb
Nov 15 '05 #1
0 4995

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

Similar topics

10
by: Bill Burris | last post by:
How do I set the ServiceType to InteractiveProcess, since this property is read only? Is there a way to set this with code in my Installer class, or a standalone process? I normally set this...
2
by: Jonathan Leonard | last post by:
Hello, I'm using the .NET class ServiceController to start my service. After calling start, a subsequent call to ServiceController.Status is returning 'stopped.' I know the service is running...
2
by: Vadim Rapp | last post by:
Hello, I have the following code: ========== Dim RemoteService As System.ServiceProcess.ServiceController RemoteService = New System.ServiceProcess.ServiceController("service1",...
5
by: Primera | last post by:
I use the following method to stop the WMI service: string serviceName = "Windows Management Instrumentation" public static void stopService(string serviceName) { ServiceController services =...
6
by: Arnie | last post by:
We're using the ServiceController class provided by the .NET Framework, programming in C#. We are using the Start() method to start a service from another service. This works fine most of the...
3
by: Bram Hoefnagel | last post by:
Hi, On the 1.1 framework I couldn't find a solution to get a list of services from an other PC. Only a list of services on My local PC. (witch is strange i guess, as you look to the MSDN doc.) ...
1
by: Martin Arvidsson, Visual Systems AB | last post by:
Hi! I am using a ServiceController to start and stop my service. If i use the service localy and use the service controller it works fine. If i install the service on my server and try to...
7
by: =?Utf-8?B?YXVsZGg=?= | last post by:
hello, i'm try to research the way to open a remote machine's to collect the services and processes. i have the local data collection running but i can not figure out what MSDN or the C# help file...
1
by: Peted | last post by:
Hello. Im using vs2008 c# and XP sp3 I wanted to learn how to use c# to control remotely COM+ Applications under Component services of another desktop on the same network runnung XPsp3 and do...
0
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...
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: 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
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
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
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.