[quoted text, click to view] Hakan Örnek wrote:
> Hi ,
> I want to parameter passing to my windows sevice. I call service
> commands like this ;
> '------------------------------------------------------------
> Dim sc As ServiceController
> sc = New ServiceController("ProsetLogServices")
> sc.MachineName = "."
> If sc.Status = ServiceControllerStatus.Stopped Then
> sc.Start()
> End If
> sc.ExecuteCommand(129)
> '------------------------------------------------------------
> This is working but how can I passing parameters to windows service
> function...
>
> Thanks for all help...
>
>
Service start parameters are part of the SCM registration of the
service, that is, stored in the SCM database which is housed in the
registry, these are not call paramters to the start function. If you
have information to tell the service about how it should start you need
to store that in a pre-agreed location. An alternative might be to
modify the registration of the service before starting it, but this is
risky, because although it is relatively stable, it is the domain of the
SCM to read and write data from here, which means its format could