473,385 Members | 1,355 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,385 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 10674
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...
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
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: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
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:
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
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...

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.