install windows serivce e.g

@echo off
echo ----------------------------------------------------------
echo Service Installation...

C:\Windows\Microsoft.NET\Framework64\v4.0.30319\InstallUtil.exe D:\Project\WindowsService.exe

echo Service installation completed

pause

save file name: install.bat

uninstall windows service e.g

@echo off
echo ----------------------------------------------------------
echo Start Stopping Services...

net stop UpdateUserDataToRedisService

echo Stop service completion.
pause

echo ----------------------------------------------------------

echo Unloading service in progress...

C:\Windows\Microsoft.NET\Framework64\v4.0.30319\InstallUtil.exe D:\Project\WindowsService.exe /u

echo Unloading Service Completion.
echo ----------------------------------------------------------
pause

save file name:unInstall.bat

start service

@echo off
echo ----------------------------------------------------------

echo Start the service...

net start UpdateUserDataToRedisService

echo Start service completion

echo ----------------------------------------------------------
pause

save file name: startservice.bat

install windows service的更多相关文章

  1. Self install windows service in .NET c#

    http://stackoverflow.com/questions/4144019/self-install-windows-service-in-net-c-sharp using System; ...

  2. redis SERVER INSTALL WINDOWS SERVICE

    以管理 员身份 运行 CMD 命令,进入redis所在目录,并运行下 脚本redis-server --service-install redis.windows-service.conf --log ...

  3. 使用C#编程语言开发Windows Service服务

    转载-https://www.cnblogs.com/yubao/p/8443455.html Create Windows Service project using Visual Studio C ...

  4. Install Jenkins Slave as Windows Service

    https://wiki.jenkins-ci.org/display/JENKINS/Installing+Jenkins+as+a+Windows+service SC 直接创建windows s ...

  5. C#创建、安装、卸载、调试Windows Service(Windows 服务)的简单教程

    前言:Microsoft Windows 服务能够创建在它们自己的 Windows 会话中可长时间运行的可执行应用程序.这些服务可以在计算机启动时自动启动,可以暂停和重新启动而且不显示任何用户界面.这 ...

  6. 使用Windows Service Wrapper快速创建一个Windows Service

    前言 今天介绍一个小工具的使用.我们都知道Windows Service是一种特殊的应用程序,它的好处是可以一直在后台运行,相对来说,比较适合一些需要一直运行同时不需要过多用户干预的应用程序,这一类我 ...

  7. Windows Service--Write a Better Windows Service

    原文地址: http://visualstudiomagazine.com/Articles/2005/10/01/Write-a-Better-Windows-Service.aspx?Page=1 ...

  8. 使用Python写Windows Service服务程序

    1.背景 如果你想用Python开发Windows程序,并让其开机启动等,就必须写成windows的服务程序Windows Service,用Python来做这个事情必须要借助第三方模块pywin32 ...

  9. C# 创建Windows Service

    当我们需要一个程序长期运行,但是不需要界面显示时可以考虑使用Windows Service来实现.这篇博客将简单介绍一下如何创建一个Windows Service,安装/卸载Windows Servi ...

随机推荐

  1. <Linux> Xen虚拟机下挂载

    //创建源vdisk挂载目录: mkdir vd1 //创建目标vdisk挂载目录: mkdir vd2 //只需第一次执行:  iscsiadm -m discovery --type sendta ...

  2. How to use WinSCP with public key authentication

          http://www.techrepublic.com/blog/it-security/how-to-use-winscp-with-public-key-authentication/ ...

  3. 栈溢出笔记1.9 认识SEH

    从本节開始,我们就要研究一些略微高级点的话题了,如同在1.2节中看到的,Windows中为抵抗栈溢出做了非常多保护性的检查工作,编译的程序默认开启了这些保护. 假设我们不能绕过这些保护.那么我们的Sh ...

  4. android webview中的音乐的暂停与播放

    前段时间有这样一个需求,webview显示一个带音乐的网页,在播放音乐的时候进入第三方软件暂停播放,返回时继续播放.后来参考了两篇文章解决了这个问题. AudioManager audioManage ...

  5. [Postgre] Insert Data into Postgre Tables

    // Insert one row INSERT INTO movies (title, release_date, count_stars, director_id) VALUES ( 'Kill ...

  6. HDU 5044 Tree(树链剖分)

    HDU 5044 Tree field=problem&key=2014+ACM%2FICPC+Asia+Regional+Shanghai+Online&source=1&s ...

  7. Bootstrap3简单好用,轻松实现手机适配

    个人官网http://FansUnion.cn,前端使用Bootstrap框架.大部分的样式,轻松就实现了. 只是呢,关于导航条,被无数网友吐槽了.      通过手机访问时,导航条把屏幕给完全占居了 ...

  8. ACCESS通过一个连接写入的数据,还有一个连接却读取不出来

    近期在用c#实现一个数据导入的功能,将一个ACCESS数据库中的数据导入到还有一个ACCESS的数据库中,然后显示出来,可是导入成功了.却显示不出来. 经过研究认为应该是缓存的原因,因为我写入数据和读 ...

  9. Erlang 学习笔记

    http://wenku.baidu.com/link?url=AUQR8Hn-e-fEB_lqjXsd8XfapWj1qAK7J05JoBXFib_LlSk5qSOTia8HIxNV1XkeZi-k ...

  10. python request post

    import requests import json class BaiduTranslateSpider: def __init__(self, kw): self.url = "htt ...