473,406 Members | 2,620 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,406 software developers and data experts.

How to change the Startup Type of a Service with VB.NET?

Hi,

How do you change the Startup Type of a Windows Service with VB.NET?
When using the ServiceController you can Start and Stop a Service, but I
can't find anywhere how to change the Startup Type?

Thanks a lot in advance,

Pieter
Jul 21 '05 #1
3 10680
Look at the StartType property of the ServiceInstaller class.
Jul 21 '05 #2
Hi

You can have this code to start the service automatically :
serviceInstaller1.StartType =
System.ServiceProcess.ServiceStartMode.Automatic;

This must be added in the ProjectInstaller class.

,,,

Senthil

"Gabriele G. Ponti" <ggponti.at.hotmail.com> wrote in message
news:u3**************@TK2MSFTNGP15.phx.gbl...
Look at the StartType property of the ServiceInstaller class.

Jul 21 '05 #3


"DraguVaso" wrote:
Hi,

How do you change the Startup Type of a Windows Service with VB.NET?
When using the ServiceController you can Start and Stop a Service, but I
can't find anywhere how to change the Startup Type?

Thanks a lot in advance,

Pieter

Jul 21 '05 #4

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...
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...
3
by: Vinay | last post by:
HI, I am writing a utility which will list all the services running on system like services.msc program. Now I want to display the Startup type of service like manual/automation. How can I get...
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: DraguVaso | last post by:
Hi, How do you change the Startup Type of a Windows Service with VB.NET? When using the ServiceController you can Start and Stop a Service, but I can't find anywhere how to change the Startup...
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...
6
by: NetworkElf | last post by:
I am trying to write a little utility and it needs to check the startup type of a given service on a remote machine and, if it is disabled, set it to manual. I have found out how to do this on the...
1
by: =?Utf-8?B?QW5kcmV3?= | last post by:
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.
1
by: SwapnilD | last post by:
I'm creating a webservice in vb.net version 2.0 on my local machine, deploying it to v1.1 on development server and getting an error "Could not create type 'Service'." Below is the code snippet that...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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...
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...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
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...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
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,...
0
isladogs
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 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.