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. ios开发之手势处理 之手势识别一

    #import "ViewController.h" @interface ViewController ()<UIGestureRecognizerDelegate> ...

  2. 【u009】瑞瑞的木板

    Time Limit: 1 second Memory Limit: 128 MB [问题描述] 瑞瑞想要亲自修复在他的一个小牧场周围的围栏.他测量栅栏并发现他需要N(1≤N≤20,000)根木板,每 ...

  3. OpenGL核心之视差映射

    笔者介绍:姜雪伟,IT公司技术合伙人.IT高级讲师,CSDN社区专家,特邀编辑.畅销书作者;已出版书籍:<手把手教你¯的纹理坐标偏移T3来对fragment的纹理坐标进行位移.你能够看到随着深度 ...

  4. Android NDK对象的引用-全局引用,局部引用,弱引用

    百度了一下,google了一下,关于NDK引用的介绍无10篇中就有9.9篇是相同的,对于这种问题,我只能呜呼哀哉了!! 局部引用(函数内部对象类型变量):在C或C++中,局部变量表示只运行范围局限在该 ...

  5. [SVG] Add an SVG as a Background Image

    Learn how to set an SVG as the background image of an element. Background images can be resized by c ...

  6. 树莓派——root用户和sudo

    Linux操作系统是一个多用户操作系统,它同意多个用户登录和使用一台计算机. 为了保护计算机(和其它用户的隐私).用户都被限制了能做的事情. 大多数用户都同意执行计算机上大部分程序,而且编辑和保存存放 ...

  7. webrtc 它android与PC互通

    折腾了一个多星期,今天终将PC和android音频,视频全部打通. 到现在,android与android,pC与PC,android与PC之间已经解决了互通,的音频和视频是能够. 前段时间开了PC与 ...

  8. HDU 4352 XHXJ's LIS - 状压dp + LIS

    传送门 题目大意: 求[l, r]中数位的最长上升序列恰好为k的数的个数. 题目分析: 首先要理解\(o(nlogn)\)求LIS问题的思路,每次寻找第一个大于等于的数将其更改. 设dp[pos][s ...

  9. 【t012】整理书架

    Time Limit: 1 second Memory Limit: 32 MB [问题描述] 小明是一个非常喜欢读书的孩子,他有一个特别的书架,书架上摆放着他买的新书.当他决定要阅读某本图书时,他就 ...

  10. 在深入分析:Fragment与Activity一些互动的方式(一,使用Handler)

    在这里,我不再具体介绍了编写更传统的方式,比如静态变量,静态方法.持久性,application全局变量.发送和接收广播等等.. 首先让我们介绍使用Handler实现Fragment与Activity ...