I'm trying to recreate as a "real" service in .NET an application first written in VB6.

This service eventually will be a socket server, I want the user to be able to define the port on which to listen.

I can manually put in start parameters in the properties of the installed service, and this is passed to the OnStart sub, but this doesn't stick.

What's the preferred method for getting user defined values to the service?