This is a discussion on "windowservice startparameter" within the ASP.NET Forum section. This forum, and the thread "windowservice startparameter are both part of the Program Your Website category.
|
|
|
|
|
![]() |
||
windowservice startparameter
|
||
| Notices |
![]() |
|
|
LinkBack | Thread Tools |
|
#1
|
|||
|
|||
|
windowservice startparameter
hi
Is there a way to set the startparameter of a windowservice programmatically, for that I can set the starttype to 'automatic'?? maybe in the projectinstaller-class (serviceinstaller)?? to explain a little more: when the service is installed, you can select it in the Windows Services Control Manager (Programs->Administrative Tools->Services). then right-click it an choose 'properties' and there you can write a startparameter and start the service. (everytime you close the properties-window, this parameter is deleted...) i would like to know how i can force the service to keep that parameter.... thanx for any help!! greets Sabine |
|
|
|
#2
|
|||
|
|||
|
Open the ServiceInstaller properties window, change the StartType property to Automatic.
|
|
#3
|
|||
|
|||
|
thanx. but thats not what i need to know. i know how you can change the startTYPE. I need to know how to set the start PARAMETER programmatically (not manually)
|
|
#4
|
|||
|
|||
|
The OnStart method has an args() parameter. Have you looked at that?
|
|
#5
|
|||
|
|||
|
yes, i looked at the args you get in the onstart().
when you enter a start parameter (manually) when you start the service, you get that as an arg in the onstart. but: HOW can I set these start parameters other than manually? can I set an option in the projectinstaller? or what? |
|
#6
|
|||
|
|||
|
You can't keep it from being changed, but you can modify the start parameter with code by modifying the registry.
http://www.jsiinc.com/SUBA/tip0300/rh0324.htm |
![]() |
| Tags |
| windowservice, startparameter |
| Thread Tools | |
|
|