Failed due to the absence of a serviceprocessinstaller




















New Post. I created a service using the wizard and then I added an Installer class. Problem 1: I got the following error: System. NET 1. NET 2. I got rid of the.

Problem 2: I got the following error: System. The ServiceProcessInstaller must either be the containing installer, or it must be present in the Installers collection on the same installer as the ServiceInstaller.

Problem 3: I got the following error: System. ArgumentException: Must specify value for source. Follow Post Reply. Phil Wilson. Nobody who works with fully-featured installation tools uses installer classes to install services. NET came along. Active Oldest Votes. AddRange new System.

Do you know any way to do the same thing via UI? Here's an example of one I have handy that works: namespace OnpointConnect. Note that each instance of the service should be installed from a unique directory with its own config file and database. LocalSystem; serviceInstaller. Add serviceInstaller ; Installers. LogMessage "An error occured while creating configuration information for the service. Tom Cabanski Tom Cabanski 7, 2 2 gold badges 20 20 silver badges 25 25 bronze badges.

Sign up or log in Sign up using Google. Sign up using Facebook. Sign up using Email and Password. Post as a guest Name. To install your service you would run the following command from the command line:. This works for any. NET assembly that defines at least one installer. You'll still need to start the service manually though. Please refer to the MSDN documentation on creating and installing services for more information on how to do all this.

For services, the service EXE service process must have its own installer. Each service then gets its own service installer. The SP installer is responsible for setting up process level settings like binary paths and credentials. Service installers are concerned with service names and dependencies. All this should have been created for you when you created your first service installer through the designer.

If it hasn't then drop a service process installer onto your service to create it. You'll then need to configure it. You might have to go into each service installer and set the Parent property to point to the service process installer.

Then everything should install correctly. And I would like to deploy the window service to another pc. AppSettings[ "WatchPath" ];. Mapped drives are per-user. Mapped drives point to a server and share name. Therefore the UNC path is the full path to the server and share.

If not then you'll need to create a mapped drive inside the service otherwise it'll fail. Also note that you'll have to handle the case where the mapped drive letter might already be in use.

In your config file you should store the UNC path. If FSW supports it, then use it. If it doesn't support it then map a drive when the service starts and unmap it when the service terminates. I don't know what the time limit is but Windows does not expect service processes to go away almost as soon as they are started.



0コメント

  • 1000 / 1000