zoukankan      html  css  js  c++  java
  • 注册Windows service及其相关

    注册Windows service,.net写的

    net stop "xxxxxx"
    "%SYSTEMROOT%Microsoft.NETFrameworkv2.0.50727InstallUtil.exe" /u aaaaa.exe

    "%SYSTEMROOT%Microsoft.NETFrameworkv2.0.50727InstallUtil.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:MyTestCodeRemoteExeDebugRemoteExeService.exe"

    还不行

    最后是少个空格

    sc create RemoteExe binpath= "C:MyTestCodeRemoteExeDebugRemoteExeService.exe"

     

    binpath=之后要有一个空格

    真变态

  • 相关阅读:
    Basic GC Tuning
    程序员如何少走弯路,更好的提升技术。
    WPF 多线程
    IOC
    一句话概括WPF知识点
    WPF数据绑定 Binding
    WPF命令
    WPF依赖属性
    WPF路由事件
    WPF绘图和动画
  • 原文地址:https://www.cnblogs.com/oer2001/p/3569862.html
Copyright © 2011-2022 走看看