Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

I have created a windows service, I have also created the Setup package for this service. When I am testing the service on my development machine I use the following cmd: installutil abc.exe to install the service. I have a number of break points in my code, and have the line Debugger.Launch() in the OnStart(). Therefore when I go to services in control panel, and start my windows service, I am asked what debugger I want to use. That is grand, no problems there, and I am able to debug my code.

 

I then remove the line Debugger.Launch(), rebuild my project, rebuild my setup project in release mode. I then transfer the setup project files to the deployment server, and double click on release\abc.exe. This is where my problems are occuring, When I go to the services application, my application abc does not show. If I go to the add remove programs option I can see my application. Likewise if I go to the event viewer and look at the applications log I see that abc has been installed without any problem. I have tried to use the installutil command on the server with the .exe installed. However I get the following message: "Exception occured while initializing the installation. The format of the file abc.exe is invalid..."

 

Any suggestions on where I am going wrong?

 

Mike55.

A Client refers to the person who incurs the development cost.

A Customer refers to the person that pays to use the product.

------

My software never has bugs. It just develops random features. (Mosabama vbforums.com)

  • 2 weeks later...
Posted

In the end I had to copy up the setup file for my project. Once copied, I installed the application. I then had to open the command prompt and navigate to the windows folder, and the folder for version 2.0.50727. I then had the use the command "installutil" and specify the location of the .exe file i.e. c:/programfiles etc. however to get the installutil command to work I had to place the file location in quotation marks.

 

Mike55.

A Client refers to the person who incurs the development cost.

A Customer refers to the person that pays to use the product.

------

My software never has bugs. It just develops random features. (Mosabama vbforums.com)

Posted
Instead of manually registering the service, you can automate it in your deployment package by adding the service executable as a custom action. This will automatically register/unregister the service using the ServiceInstaller and ServiceProcessInstaller you configured.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...