0

I have created an Winform application which is used to manage Book information and Generate Invoice now there is a Database function in Application which is called in every 6 days,but this function will work only when application is running. So i have created a windows service for this, Now i want to know how to i deploy my windows service with my windows application. Thanks !!!!

4

3 回答 3

-1

You must use the installutil utility

installutil (e.g installutil C:\MyService.exe)

From MSDN:

To install a Windows service On the Start menu or Start Page, open the shortcut menu for Developer Command Prompt, and then choose Run As Administrator. Navigate to the folder that contains your project's output. For example, under your My Documents folder, navigate to Visual Studio 2012\Projects\MyNewService\bin\Debug. Enter the following command: installutil.exe MyNewService.exe If the service installs successfully, installutil.exe will report success.

Then go to Start --> Execute and type:

services.msc

Check that your service was succesfully installed and set it's startup type (auto, manual...)

于 2013-05-07T07:58:29.080 回答
-1

您可以为该服务创建一个安装程序并与您的主应用程序一起安装。你可以在这里看到更多:

如何在 Visual C# 中为 Windows 服务应用程序创建安装项目

于 2013-05-07T08:02:32.427 回答
-1

这是一个链接,向您展示如何安装 Windows 服务

安装windows服务

您已确保以管理员身份运行命令提示符并选择正确版本的 .netFramework 以及它是 64 位还是 32 位应用程序

于 2013-05-07T08:02:40.173 回答