Click here to Skip to main content
15,893,588 members
Articles / Programming Languages / C#

Extend ServiceController class to change the StartupType of Windows Services

Rate me:
Please Sign up or sign in to vote.
4.53/5 (22 votes)
7 Jul 20045 min read 122.7K   2.8K   41  
How to control the windows service's StartupType and extend the functionality of the ServiceController class
Microsoft Visual Studio Solution File, Format Version 8.00
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ServiceControllerEx", "ServiceControllerEx\ServiceControllerEx.csproj", "{EEF9135A-B85F-4B79-829F-0370B84AE663}"
	ProjectSection(ProjectDependencies) = postProject
	EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TestApp", "TestApp\TestApp.csproj", "{FAF74095-A83C-4C47-AF56-6FE1CBF0E48B}"
	ProjectSection(ProjectDependencies) = postProject
	EndProjectSection
EndProject
Global
	GlobalSection(SolutionConfiguration) = preSolution
		Debug = Debug
		Release = Release
	EndGlobalSection
	GlobalSection(ProjectConfiguration) = postSolution
		{EEF9135A-B85F-4B79-829F-0370B84AE663}.Debug.ActiveCfg = Debug|.NET
		{EEF9135A-B85F-4B79-829F-0370B84AE663}.Debug.Build.0 = Debug|.NET
		{EEF9135A-B85F-4B79-829F-0370B84AE663}.Release.ActiveCfg = Release|.NET
		{EEF9135A-B85F-4B79-829F-0370B84AE663}.Release.Build.0 = Release|.NET
		{FAF74095-A83C-4C47-AF56-6FE1CBF0E48B}.Debug.ActiveCfg = Debug|.NET
		{FAF74095-A83C-4C47-AF56-6FE1CBF0E48B}.Debug.Build.0 = Debug|.NET
		{FAF74095-A83C-4C47-AF56-6FE1CBF0E48B}.Release.ActiveCfg = Release|.NET
		{FAF74095-A83C-4C47-AF56-6FE1CBF0E48B}.Release.Build.0 = Release|.NET
	EndGlobalSection
	GlobalSection(ExtensibilityGlobals) = postSolution
	EndGlobalSection
	GlobalSection(ExtensibilityAddIns) = postSolution
	EndGlobalSection
EndGlobal

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here


Written By
Web Developer
Ireland Ireland
Expert in Microsoft technologies.
MCP+Site Building, MCSD, MCAD, and MCSD.NET (Early achiever)
Worked as Web developer, Trainer and software developer
Currently working as Developer support engineer.
You can contact me also through my blog http://blogs.msdn.com/mohamed_sharafs_blog/

Comments and Discussions