Hi
I have a service installed, but I want to programatically set it to 'Manual'
startup, rather than 'Automatic'.
I cannot do this with 'System.serviceProcess.ServiceInstaller()' as I don't
actually install the service (MSDE does), but I want it set to Manual, and
my app starts and stops it.
I can Start and Stop the service, but need it to be Manual, and not
Automatic
Any help appreciated
Thanks
Paul 4 6104
The ServiceInstaller class has a property called 'StartType' this defaults
to 'Manual'. Is this being set to 'Automatic' somewhere in your code?
--
HTH
Ollie Riches http://www.phoneanalyser.net
Disclaimer: Opinions expressed in this forum are my own, and not
representative of my employer.
I do not answer questions on behalf of my employer. I'm just a programmer
helping programmers.
"Paul Aspinall" <pa**@aspy.co.uk> wrote in message
news:n4*******************@fe1.news.blueyonder.co. uk... Hi I have a service installed, but I want to programatically set it to
'Manual' startup, rather than 'Automatic'.
I cannot do this with 'System.serviceProcess.ServiceInstaller()' as I
don't actually install the service (MSDE does), but I want it set to Manual, and my app starts and stops it.
I can Start and Stop the service, but need it to be Manual, and not Automatic
Any help appreciated
Thanks
Paul
Hi,
You can use the ServiceInstaller class to set the same. For this, you need
to do the following (You could have done some of them already)
1. Reference the System.ServiceProcess.ServiceInstaller. Do this by using
"Add/Remove Item" option from right clicking on the "Components" tab in
ToolBox. Find the "ServiceInstaller". Select it.
2. Drag the ServiceInstaller and name it (lets say "testinstaller"). You
will see an entry in the "Component Designer generated code" section in your
project.
3. Now in your install event, you can say, testinstaller.StartType =
ServiceStartMode.Manual.
You can see an example here... http://www.codeproject.com/csharp/csharpsvclesson2.asp
Hope this helps.
Ganesh
"Paul Aspinall" wrote: Hi I have a service installed, but I want to programatically set it to 'Manual' startup, rather than 'Automatic'.
I cannot do this with 'System.serviceProcess.ServiceInstaller()' as I don't actually install the service (MSDE does), but I want it set to Manual, and my app starts and stops it.
I can Start and Stop the service, but need it to be Manual, and not Automatic
Any help appreciated
Thanks
Paul
Hi Paul,
If you want to do it from code, after the service is installed you have to
change it in the registry , in
LOCAL_MACHINE\System\\CurrentControlSet\\Services\ \ change the Start value,
2 is auto , 3 is manual.
cheers,
--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation
"Paul Aspinall" <pa**@aspy.co.uk> wrote in message
news:n4*******************@fe1.news.blueyonder.co. uk... Hi I have a service installed, but I want to programatically set it to 'Manual' startup, rather than 'Automatic'.
I cannot do this with 'System.serviceProcess.ServiceInstaller()' as I don't actually install the service (MSDE does), but I want it set to Manual, and my app starts and stops it.
I can Start and Stop the service, but need it to be Manual, and not Automatic
Any help appreciated
Thanks
Paul
Use the System.ServiceProcess.ServiceController class. It allows
programmattic control of many service properties.
"Paul Aspinall" <pa**@aspy.co.uk> wrote in message
news:n4*******************@fe1.news.blueyonder.co. uk... Hi I have a service installed, but I want to programatically set it to 'Manual' startup, rather than 'Automatic'.
I cannot do this with 'System.serviceProcess.ServiceInstaller()' as I don't actually install the service (MSDE does), but I want it set to Manual, and my app starts and stops it.
I can Start and Stop the service, but need it to be Manual, and not Automatic
Any help appreciated
Thanks
Paul This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Maligaya Park |
last post by:
How do you setup SQL Mail? I tried following the procedures on the
online manual but I do not understand what "On the instance of SQL
Server, start the mail client using the newly created mail...
|
by: Mike John |
last post by:
I want to install a service that I made in .Net.
I have trying the following in the Visual Studio .NET
Command Prompt:
installutil C:\myservice.exe
The above syntax did not work.
Is the...
|
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...
|
by: Sam |
last post by:
Service properties
------------------
Log On As: LocalSystem
Logon account has full admin privileges.
OnStart() routine
-----------------
{
EventLog->WriteEntry ("Commencing..."); .... A
|
by: Frank Rizzo |
last post by:
Hello,
My c# based windows service takes a while to dispose. I have to release
bunch of resources all over the place and unfortunately it can take
20-40 seconds before I can cleanly exit.
...
|
by: Mike Woinoski |
last post by:
(I'm new to VS, so please forgive me if this is a faq.) I'm writing some Java
web services and need to test them with C++ clients. I can use either a Windows
Form application or an MFC application....
|
by: Noel |
last post by:
Hello,
I'm currently developing a web service that retrieves data from an employee
table. I would like to send and retrieve a custom employee class to/from the
webservice. I have currently coded...
|
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...
|
by: laredotornado |
last post by:
Hi,
I'm using PHP 4.4.4 on Apache 2 on Fedora Core 5. PHP was installed
using Apache's apxs and the php library was installed to
/usr/local/php. However, when I set my "error_reporting"...
|
by: DolphinDB |
last post by:
Tired of spending countless mintues downsampling your data? Look no further!
In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM).
In this month's session, we are pleased to welcome back...
|
by: Vimpel783 |
last post by:
Hello!
Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
|
by: jfyes |
last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
|
by: PapaRatzi |
last post by:
Hello,
I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
|
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...
|
by: Defcon1945 |
last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
|
by: Shællîpôpï 09 |
last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
|
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...
| |