把任何可执行文件(包括批处理和脚本)当作系统服务运行的工具 下载

软件发布|下载排行|最新软件

当前位置:首页IT学院IT技术

把任何可执行文件(包括批处理和脚本)当作系统服务运行的工具 下载

  2021-03-17 我要评论
想了解把任何可执行文件(包括批处理和脚本)当作系统服务运行的工具 下载的相关内容吗,在本文为您仔细讲解的相关知识和一些Code实例,欢迎阅读和指正,我们先划重点:把任何可执行文件(包括批处理和脚本)当作系统服务运行的工具,下载,下面大家一起来学习吧。

Run As Service
把任何可执行文件(包括批处理和角本)当作系统服务运行的工具
≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡
介绍:
  ■ 将任何可执行文件作为系统服务运行。
  ■ 开始主要是为了移植一些linux 的 daemon;也可以用于启动任何应用程序和维护性角本。
  ■ 安静地运行,除非指定了 Interactive 模式,否则不会弹出任何窗口。
  ■ 无需登陆,系统启动后自动运行,无需等待用户登陆完毕。
  ■ 作为附带的功能,支持启动、停止和删除任何系统服务。
  ■ 完整接管系统服务管理器的指令(启动、停止等等)。运行的程序终止后,自动向服务管理器提交状态同时自身退出,不会驻留内存。
≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡
帮助屏幕:
C:\Documents and Settings\Administrator>
#runassrv
=======================================================================
  Run As Service Ver 1.0.0.3 by BaiYang / 2004, Freeware
=======================================================================
Run any program as a Service
USAGE: runassrv <Action> <Options>
=======================================================================
Actions:
  -add      - Add a Service.
  -remove   - Remove a Service.
  -start    - Start a Service.
  -stop     - Stop a Service.
  -listgrp  - List all service load order groups on local system.
  -h        - this screen
=======================================================================
Options:
  -cmdline   - when the service start, witch program you want to run.
  -name      - the service name.
  -dispname  - service's display name in service manager
  -desc      - service's description in service manager
                 DEFAULT: none
  -type      - service type, can be:
                 FileSystemDriver
                 KernelDriver
                 OwnProcess (DEFAULT)
                 ShareProcess
                 InteractiveProcess
               NOTE: set this option incorrectly may endanger your syst
  -starttype - service start type, can be:
                 SystemStart
                 BootStart
                 AutoStart (DEFAULT)
                 DemandStart
                 Disabled
               NOTE: set this option incorrectly may endanger your syst
  -errctl    - service error control policy, can be:
                 ErrorIgnore
                 ErrorNormal (DEFAULT)
                 ErrorSevere
                 ErrorCritical
               NOTE: set this option incorrectly may endanger your syst
  -group     - specify service load order group
                 DEFAULT: none
  -depen     - names of services or load ordering groups that the syste
               must start before this service, delimited by '/'
                 DEFAULT: none
  -user      - specifies the name of the account under which the servic
               should run.
                 DEFAULT: LocalSystem
  -pass      - contains the password to the account name
                 DEFAULT: none
  -priority  - priority of the program you want to run, can be:
                 Idle
                 BelowNormal
                 Normal (DEFAULT)
                 AboveNormal
                 High
                 RealTime
=======================================================================
Examples:
  runassrv /add /cmdline:"c:\tools\myapp.exe -arg1 -arg2" /name:"mysrv" /dispname:"example service"
  runassrv /listgrp
  runassrv /remove /name:"mysrv"
≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡
简单中文帮助:
C:\Documents and Settings\Administrator>
#runassrv
=======================================================================
  Run As Service Ver 1.0.0.3 by BaiYang / 2004, Freeware
=======================================================================
将任何可执行程序作为系统服务运行
用法: runassrv <动作> <选项>
=======================================================================
动作:
  -add      - 新增一个服务.
  -remove   - 删除一个服务.
  -start    - 启动一个服务.
  -stop     - 停止一个服务.
  -listgrp  - 列出当前系统中所有服务启动组的优先级顺序.
  -h        - 本帮助屏幕.
=======================================================================
选项:
  -cmdline   - 当服务启动时,指定你真正想要运行那个程序.
  -name      - 指定系统服务名(net start 等系统操作用).
  -dispname  - 指定用户将要看到的服务显示名称(在服务管理器中看到的名称).
  -desc      - 指定服务描述(在服务管理器中看到的服务描述信息)
                 默认: 无
  -type      - 指定服务类型,可以是以下几种:
                 FileSystemDriver  : 文件系统及驱动,将在内核载入之前被装入,注
                                     意这个级别的服务几乎不可以使用任何系统API。
                 KernelDriver      : 内核级驱动,内核装入后,立即被装入,这个
                                     级别的服务只能使用受限的API。
                 OwnProcess        : 单独进程服务,标准服务,在Win32子系统ready
                                     后启动,默认。
                 ShareProcess      : 共享进程服务,即数个服务共享同一进程,很多
                                     依赖svchost的服务都使用这种类型。
                 InteractiveProcess: 交互式服务,服务可以与用户交互,除了这个类
                                     型以外,其它所有类型的服务都不可能有用户可
                                     见的界面。
               注意: 错误的设置这个选项可能使系统变得不稳定,甚至无法启动!如果
                     不知道自己正在做什么,请不要尝试前两项。
  -starttype - 服务启动类型,包括:
                 SystemStart : 系统级启动,在kernel初始化后启动。
                 BootStart   : 由系统装载器启动(kernel初始化前)。
                 AutoStart   : 自动启动,Win32子系统初始化完毕后启动,默认。
                 DemandStart : 手动。
                 Disabled    : 禁用。
               注意: 错误的设置这个选项可能使系统变得不稳定,甚至无法启动!如果
                     不知道自己正在做什么,请不要尝试前两项。
  -errctl    - 指定服务出错时的错误处理策略,可以是:
                 ErrorIgnore   : 忽略错误,不挽救服务,系统继续运行
                 ErrorNormal   : 记录到系统日志,并且弹出一个对话框提示用户,默
                                 认。(默认)
                 ErrorSevere   : 记录日志并弹出提示框,如果当前系统已经运行于了
                                 最后一次正确启动的配置,则忽略该错误,否则自动
                                 重启到最后一次正确配置。
                 ErrorCritical : 同上,但是如果重启到最后一次正确配置还是启动本
                                 服务失败就蓝屏。
               注意: 错误的设置这个选项可能使系统变得不稳定,甚至无法启动!如果
                     不知道自己正在做什么,请不要尝试后两项。
  -group     - 指定服务属于的启动优先级组,优先级组可以通过 listgrp 按顺序列出。
                 默认: 无
  -depen     - 指定本服务所依赖的服务,在这里指定的服务必须在本服务启动之前正确
               启动。多个服务之间用 “/”分割。这里要指定系统服务名,而不是用户
               看到的那个名称。
                 默认: 无
  -user      - 指定用户身份,即本服务使用那个用户帐号运行
                 默认: LocalSystem(本地系统,最高权限),交互式服务必须使用这个
                       帐号。
  -pass      - 指定用户密码
                 默认: 无(LocalSystem)
  -priority  - cmdline 参数指定程序的运行优先级,可以是(这个不用解释了吧):
                 Idle
                 BelowNormal
                 Normal (DEFAULT)
                 AboveNormal
                 High
                 RealTime
=======================================================================
例子:
  runassrv /add /cmdline:"c:\tools\myapp.exe -arg1 -arg2" /name:"mysrv" /dispname:"example service"
  runassrv /listgrp
  runassrv /remove /name:"mysrv"
=======================================================================
关于命令和参数的分隔符:
  所有参数以 “-” 或 “/” 为前缀;需要赋值得参数以 “:” 或 “=”作为
  赋值运算符,例如:-name="mysrv"; /name:"mysrv"; -name:"mysrv" 等组合都
  是合法的。
≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡
版权:免费软件;作者不承担任何责任。您可以将它用于任何用途,只要不做坏事。
≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡
联系作者:http://www.cn-dos.net/forum 或 asbai@msn.com
有事尽量论坛或 email 联系。不过要是你喜欢玩星际并且是手速跟我一样低(不超过100)的菜鸟,欢迎加我的 MSN ^_^
本地下载

Copyright 2022 版权所有 软件发布 访问手机版

声明:所有软件和文章来自软件开发商或者作者 如有异议 请与本站联系 联系我们