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

How to find a service's Startup Type, Log On As, etc.?

Hi, friends,

I tried to use ServiceController() to find out a service's Startup Type, Log
On As, but could not. Any ideas?

Thanks a lot.
May 22 '07 #1
1 1649
One option is to P/Invoke QueryServiceConfig Win32 API.

This has a sample:
http://www.pinvoke.net/default.aspx/...iceConfig.html

"Andrew" wrote:
Hi, friends,

I tried to use ServiceController() to find out a service's Startup Type, Log
On As, but could not. Any ideas?

Thanks a lot.
May 23 '07 #2

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

Similar topics

1
by: Matt Rapoport | last post by:
I'd like to programmatically remove a service or change its startup type to disabled. I know how to remove it from the command line but is there another way using the win32 extensions? I've...
0
by: big A | last post by:
I am experiencing an issue that i have seen posted with various descriptions but lacks any answers. I have .Net Framework 1.1 services that run without issue on windows 2000 professional; however...
2
by: Mike Parris | last post by:
Is there a trick to getting a Windows Service to start before a user has logged on to a machine? Using VS.net 2003 on a Windows 2000 machine, I have built a Windows service using vb.net . I have...
1
by: DevMountain | last post by:
I am running the ASP.NET State service on 3 servers and one workstation. I have set the startup type to 'Automatic' on all instances. After rebooting any of these machines, the service does not...
0
by: normb | last post by:
I'm writing a C# app in which I need to get the Startup type of a couple of services that are registered on the machine. I need to record what the Startup type value is at the time of program...
3
by: Amjad | last post by:
Hi, I just wrote a test Windows Service that creates a text file on startup (please see my code below). The file is never created. Protected Overrides Sub OnStart(ByVal args() As String) Dim...
4
by: tshad | last post by:
What would be a good way to check programmatically whether a service was running? We have a service that dies periodically and I need to check to see if this service is running. I know how to...
2
by: rqcoder | last post by:
Is there a way to change a Service's startup type somewhere in the .net framework? I've been messing around with the System.ServiceProcess namespace which allows me to start, stop and pause...
0
by: vsrikanth568 | last post by:
Hi, 1. How to change the service startup type from 'Manual' to 'Auto' or 'Disabled' to 'Auto' using WMI classes in C#? 2. How to change the service startup type using WMI classes in C#? 3. Is...
1
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...
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: 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: 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
0
BarryA
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...
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...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.