注册Windows service,.net写的

net stop "xxxxxx"
"%SYSTEMROOT%\Microsoft.NET\Framework\v2.0.50727\InstallUtil.exe" /u aaaaa.exe

"%SYSTEMROOT%\Microsoft.NET\Framework\v2.0.50727\InstallUtil.exe" aaaaa.exe
net start "xxxxxx"

xxxxxx是在services管理界面里看到的名字

==============================

c++写的

sc delete xxxx

=================================

今天我用clr写了一个service,试图用InstallUtil.exe注册,自己没有意识到

总是得到这个错误

Exception occurred while initializing the installation:

System.IO.FileLoadException: Attempt to load an unverifiable executable with fixups (IAT with more than 2 sections or a TLS section.) (Exception from HRESULT: 0

x80131019).

后来又用servicename.exe -install

午饭后脑子很不好使

后来用这个

sc create RemoteExe binpath="C:\MyTestCode\RemoteExe\Debug\RemoteExeService.exe"

还不行

最后是少个空格

sc create RemoteExe binpath= "C:\MyTestCode\RemoteExe\Debug\RemoteExeService.exe"

在binpath=之后要有一个空格

真变态

最新文章

  1. 关于robotframework,app,appium的xpath定位问题及常用方法
  2. iOS9 3DTouch开发
  3. cookie的弊端
  4. petapoco sql语句参数化 插入邮箱地址
  5. cocos2dx 3.0 之 lua 创建类
  6. java 获取当前系统系时间
  7. sicily 1010. 单词数值
  8. VB调用自持字体
  9. 利用JS_SDK实现QQ第三方登录
  10. swing容器继承重绘问题解决
  11. C# ToString常用技巧总结
  12. 基于集合成工控机Ubuntu系统安装分区详解
  13. /etc/sysconfig/network-scripts/ifcfg-eth0
  14. vue-router之router-link
  15. iOS枚举的运用
  16. 解决苹果电脑(mac)管理员账户变成了普通用户后不能解锁用户与群组的问题
  17. Ecshop中transport和jquery不兼容的解决方案
  18. centos7 部署vnc
  19. Golang 字符串操作--使用strings、strconv包
  20. display position 和float的作用和关系

热门文章

  1. SQL Server 2012安装——.net framework 3.5离线安装
  2. 自定义标签报 无法为TAG [my2:hello]加载标记处理程序类[null]
  3. 洛谷P2812校园网络【Network of Schools加强版】
  4. 根据不同环境配置pom
  5. MySQL表结构,表空间,段,区,页,MVCC
  6. Spark Mllib里相似度度量(基于余弦相似度计算不同用户之间相似性)(图文详解)
  7. 牛客网Java刷题知识点之四种不同的方式创建线程
  8. Storm概念学习系列 之数据流模型、Storm数据流模型
  9. jquery的.get方法说解
  10. kotlin查看编译后的Java代码