1. 安装 windows服务

  C:\Windows\Microsoft.NET\Framework64\v4.0.30319\installutil    [服务路径](例:C:\\test\mytestService.exe)
  net start  [服务名称](例:mytestService)
  

2. 卸载服务

  sc delete [服务名]

3. 关闭服务

  net stop   [服务名称](例:mytestService)

另外,安装服务时打开控制台,请使用【管理员】权限打开。

安装和卸载windows服务 bat的更多相关文章

  1. C# 远程服务器 安装、卸载 Windows 服务,读取远程注册表,关闭杀掉远程进程

    这里安装windows服务我们用sc命令,这里需要远程服务器IP,服务名称.显示名称.描述以及执行文件,安装后需要验证服务是否安装成功,验证方法可以直接调用ServiceController来查询服务 ...

  2. 批处理文件安装与卸载Windows服务

    //安装Windows服务 将RECPost.exe和RECPostService替换成自己的项目名称和服务名称,并将文件保存成bat格式.其中%cd%是获取相对路径 @echo off set fi ...

  3. 使用InstallUtil安装及卸载Windows服务的具体操作 Visual Studio 2012版本

    关于Visual Studio 2012中使用InstallUtil对Windows服务进行安装与卸载的文章,在MSDN中的http://msdn.microsoft.com/en-us/librar ...

  4. [2016-09-23]远程安装、更新windows服务bat脚本分享

    话不多说,有兴趣的自己可以仔细研究下涉及的命令:net use.sc.robocopy 脚本 set BuildConfig=[ENV] set BuildExeName=[your_exe_name ...

  5. 用命令 安装/卸载 windows服务(转)

    第一种方法: 1. 开始 ->运行 ->cmd 2. cd到C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727(Framework版本号按IIS配置 ...

  6. C# 创建、安装和卸载Windows服务程序

    1.新建一个windows服务程序. 2.点击这个服务类,从工具箱中加入一个Timer控件,右键这个Timer控件 命名为 timerOrderDeductionDetailJob,Enable设为T ...

  7. 第十三篇 一个安装、管理windows服务的桌面程序

    在网上看到一个修改程序入口的程序去把windows 服务修改成控制台的程序,然后利用控制台的程序把服务安装和管理,也想起自己原来也写了一个对windows 报务管理的程序,不过是winform的.   ...

  8. 安装redis以windows服务形式

    安装redis以windows服务形式 安装redis以windows服务形式 redis windows windows 服务 以前跑redis,老是要开一个命令行窗口,一旦关闭,redis服务就挂 ...

  9. Mysql数据库一:安装与创建windows服务

    Mysql数据库安装与创建windows服务 1.先下载压缩包(mysql-5.7.18-winx64.zip)移动到对应目录(如D:\software)后解压. 2.安装服务端: mysqld:带d ...

随机推荐

  1. MySQL 主从复制与读写分离概念及架构分析

    1.MySQL主从复制入门 首先,我们看一个图: 影响MySQL-A数据库的操作,在数据库执行后,都会写入本地的日志系统A中. 假设,实时的将变化了的日志系统中的数据库事件操作,在MYSQL-A的33 ...

  2. git 修改最后一次提交的用户名 或者 commit的内容

    修改git最后一次提交的命令 $ git commit --amend 修改git最后一次提交用户名的相关命令 git config user.name 'wangz' git config user ...

  3. [LeetCode] K-th Smallest in Lexicographical Order 字典顺序的第K小数字

    Given integers n and k, find the lexicographically k-th smallest integer in the range from 1 to n. N ...

  4. [LeetCode] Strong Password Checker 密码强度检查器

    A password is considered strong if below conditions are all met: It has at least 6 characters and at ...

  5. [LeetCode] Count of Range Sum 区间和计数

    Given an integer array nums, return the number of range sums that lie in [lower, upper] inclusive.Ra ...

  6. [LeetCode] Fraction to Recurring Decimal 分数转循环小数

    Given two integers representing the numerator and denominator of a fraction, return the fraction in ...

  7. 单核 -512M内存-2000并发正常使用

    自从自己创业以后就很少写博客了,也许是太忙了.也许是无法静下心好好研究一个东西.今天把我们做的后台做了下压力测试.结果还可以,尤其是对于我这种从java转过来土人. 4年前看到一篇抨击java的文章 ...

  8. 在 kernel 下打 log。 怪異現象與解決方式。

    code battery_log(BAT_LOG_CRTI, "y t: %d \n", (int)my_timer_timeout); battery_log(BAT_LOG_C ...

  9. 个人理解c#对称加密 非对称加密 散列算法的应用场景

    c#类库默认实现了一系列加密算法在System.Security.Cryptography; 命名空间下 对称加密 通过同一密匙进行加密和解密.往往应用在内部数据传输情况下.比如公司a程序 和B程序 ...

  10. maven: 基本使用

    1.项目管理工具:Maven的repository,说白了就是dependency的仓库,它按照一定的规则将dependency存放起来,以作缓存,如果本机的 repository找不到某个depen ...