■注意■ 竟然有人专门加我 MSN 询问此工具和 XP 下的 SC 命令有何不同。实在让人郁闷。<img src="images/smilies/face-sad.png" align="absmiddle" border="0">
这里澄清一下,首先,一个 windows service 不是普通的可执行程序。一个应用程序想要成为 service,必须按照契约调用标准的 Windows Service API,与 Windows Service Manager 进行正确交互才可以。具体参见:
http://msdn.microsoft.com/en-us/library/ms681921(VS.85).aspx 和
http://msdn.microsoft.com/en-us/library/ms685967(VS.85).aspx。详细的 API 参考在:http://msdn.microsoft.com/en-us/library/ms685942(VS.85).aspx。
也就是说,SC 命令的作用是安装、删除、启动、停止一个 service。而 runassrv 的作用是将任何非 service 程序变成 service。
如果这样说还是不清楚的话,请尝试一下用 SC 把某个批处理或 notepad.exe 添加为服务会发生什么。
≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡
1.1.0.628 版新增内容:
■ 所有 Action (例如:add / remove 等)无需再加前缀。
■ 新增 pause / continue 操作。
■ 现在开始,一个 runassrv 服务可以并发运行多个 /cmdline 指定的应用。
■ runassrv.exe 本身不需要放入系统搜索路径中了。
■ 新增 control 操作,向指定的服务发送控制码。
■ 新增 listsrv 操作,列出所有服务和驱动,支持很多过滤条件。
■ 新增 -logfile 和 -loglevel 选项,日志记录功能。
■ 新增 -unstoppable 系统服务管理器将拒绝停止一个以该选项安装的服务。
■ 内存收缩策略,典型情况下内存开销少于 300KB。
■ 解决了在某些系统上 start / stop 命令无效的问题。
≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡
前两年写的小东西,发给大家乐呵乐呵~
Run As Service
把任何可执行文件(包括批处理和角本)当作系统服务运行的工具
≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡
介绍:
■ 将任何可执行文件作为系统服务运行。
■ 开始主要是为了移植一些linux 的 daemon;也可以用于在启动任何应用程序和维护性角本。
■ 安静地运行,除非指定了 Interactive 模式,否则不会弹出任何窗口。
■ 无需登陆,系统启动后自动运行,无需等待用户登陆完毕。
■ 作为附带的功能,支持启动、停止和删除任何系统服务。
■ 完整接管系统服务管理器的指令(启动、停止等等)。运行的程序终止后,自动向服务管理器提交状态同时自身退出,不会驻留内存。
≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡
帮助屏幕:
C:\Documents and Settings\Administrator>
#runassrv
===========================================================================
Run As Service Ver 1.1.0.625 by BaiYang / 2004 - 2006, 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.
pause - Pause a Service.
continue - Continue a paused Service.
control - Control a service by send it a op-code
listsrv - List all installed services on local system
listgrp - List all service load order groups on local system (by start
order).
-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 system!
-starttype - service start type, can be:
SystemStart
BootStart
AutoStart (DEFAULT)
DemandStart
Disabled
NOTE: set this option incorrectly may endanger your system!
-errctl - service error control policy, can be:
ErrorIgnore
ErrorNormal (DEFAULT)
ErrorSevere
ErrorCritical
NOTE: set this option incorrectly may endanger your system!
-group - specify service load order group
DEFAULT: none
-depen - names of services or load ordering groups that the system
must start before this service, delimited by '/'
DEFAULT: none
-user - specifies the name of the account under which the service
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
-unstoppable - make service unstoppable by system service control manager.
-opcode - for "control", specify the operation code.
-logfile - specify the logging target.
DEFAULT: don't log to file.
-loglevel - specify the lowest logging level, can be:
DebugOnly (Most Detail)
Info
Warning
Error (DEFAULT)
FatalError
Disabled (Close Logging Output)
===========================================================================
Special Options With "listsrv":
-name - list service name that match the wildcard pattern
DEFAULT: *
-dispname - service display name's wildcard pattern.
DEFAULT: *
-pid - service belong to specified process.
DEFAULT: any
-type - specify service types to be match, delimite by "/".
DEFAULT: any
-starttype - specify service starttypes to be match, delimite by "/".
DEFAULT: any
-group - service belong to the load order group
DEFAULT: any
-state - service's current state, can be:
active
inactive
DEFAULT: any
===========================================================================
Examples:
runassrv add /cmdline:"c:\tools\myapp.exe -arg1 -arg2" /name:"mysrv"
runassrv add /cmdline:myapp.exe /cmdline:yourapp.exe /name:mysrv
runassrv add /cmdline:notepad /cmdline:vi.bat /type:interactiveprocess /priority:AboveNormal /name:testsrv /logfile:C:\test.log /loglevel:debugonly /dispname:"My Test Service" /desc:"This is a Test Service"
runassrv start /name:wuauserv
runassrv stop /name:wuauserv
runassrv pause /name:iisadmin
runassrv control /name:wuauserv /opcode:1
runassrv listsrv /name:w*
runassrv listsrv /type:KernelDriver/FileSystemDriver
runassrv listsrv /starttype:SystemStart/BootStart
runassrv listsrv /group:pnp_tdi
runassrv listsrv /pid:1234
runassrv listgrp
≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡
简单中文帮助:
C:\Documents and Settings\Administrator>
#runassrv
===========================================================================
Run As Service Ver 1.1.0.628 by BaiYang / 2004 - 2006, Freeware
===========================================================================
将任何可执行程序作为系统服务运行
用法: runassrv <动作> <选项>
===========================================================================
动作:
add - 新增一个服务.
remove - 删除一个服务.
start - 启动一个服务.
stop - 停止一个服务.
pause - 暂停一个服务
continue - 继续一个被暂停的服务.
control - 向指定服务发送一个控制码.
listsrv - 列出当前系统中符合条件的所有服务及驱动.
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 (默认)
AboveNormal
High
RealTime
-unstoppable - 系统服务管理器将拒绝停止以此选项安装的服务。
-opcode - 为 control 命令指定要发送的控制码。控制码 “1”其实相当于命令
stop,用于停止服务。除了几个标准的控制码外,大部分控制码所对应的
行为由服务自己定义。
-logfile - 指定日志文件
默认: 不记录日志文件
-loglevel - 指定日志记录的详细程度,可以是:
DebugOnly (记录所有运行细节)
Info
Warning
Error (默认)
FatalError
Disabled (关闭对控制台和文件的日志输出)
===========================================================================
使用 listsrv 命令时的特殊选项:
-name - 指定要列出的服务名通配符
默认: *
-dispname - 指定要列出的服务显示名称通配符
默认: *
-pid - 仅列出运行于指定进程的服务
默认: 所有进程
-type - 仅列出指定类型的服务, 多个服务类型间使用 "/" 分割
默认: 所有类型
-starttype - 仅列出指定启动类型的服务, 多个类型间使用 "/" 分割
默认: 所有类型
-group - 进列出位于指定启动组的服务
默认: 任意组
-state - 仅列出当前状态满足指定值的服务, 可以是:
active : 服务当前处于活动状态(正在启动、运行等)
inactive : 服务当前处于非活动状态(已停止)
默认 : 任意
===========================================================================
例子:
runassrv add /cmdline:"c:\tools\myapp.exe -arg1 -arg2" /name:"mysrv"
runassrv add /cmdline:myapp.exe /cmdline:yourapp.exe /name:mysrv
runassrv add /cmdline:notepad /cmdline:vi.bat /type:interactiveprocess /priority:AboveNormal /name:testsrv /logfile:C:\test.log /loglevel:debugonly /dispname:"My Test Service" /desc:"This is a Test Service"
runassrv start /name:wuauserv
runassrv stop /name:wuauserv
runassrv pause /name:iisadmin
runassrv control /name:wuauserv /opcode:1
runassrv listsrv /name:w*
runassrv listsrv /type:KernelDriver/FileSystemDriver
runassrv listsrv /starttype:SystemStart/BootStart
runassrv listsrv /group:pnp_tdi
runassrv listsrv /pid:1234
runassrv listgrp
===========================================================================
关于命令和参数的分隔符:
所有参数以 “-” 或 “/” 为前缀;需要赋值得参数以 “:” 或 “=”作为
赋值运算符,例如:-name="mysrv"; /name:"mysrv"; -name:"mysrv" 等组合都
是合法的。
≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡
版权:免费软件;作者不承担任何责任。您可以将它用于任何用途,只要不做坏事 <img src="images/smilies/face-laugh.png" align="absmiddle" border="0">
≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡
联系作者:http://www.cn-dos.net/forum 或 asbai@msn.com
有事尽量论坛或 email 联系。不过要是你喜欢玩星际并且是手速跟我一样低(不超过100)的菜鸟,欢迎加我的 MSN ^_^
Last edited by asbai on 2008-6-3 at 01:33 PM ]
■Note■ Someone actually added me on MSN to ask the difference between this tool and the SC command under XP. It's really frustrating. :(
Here's the clarification: First, a Windows service is not an ordinary executable program. For an application to become a service, it must call the standard Windows Service API according to the contract and interact correctly with the Windows Service Manager. For details, refer to:
http://msdn.microsoft.com/en-us/library/ms681921(VS.85).aspx and
http://msdn.microsoft.com/en-us/library/ms685967(VS.85).aspx. The detailed API reference is at: http://msdn.microsoft.com/en-us/library/ms685942(VS.85).aspx.
That is, the function of the SC command is to install, delete, start, and stop a service. While the function of runassrv is to turn any non-service program into a service.
If this is still not clear, try using SC to add a certain batch file or notepad.exe as a service and see what happens.
≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡
New content in version 1.1.0.628:
■ All Actions (such as: add / remove, etc.) do not need to add a prefix anymore.
■ New pause / continue operations.
■ From now on, a runassrv service can concurrently run multiple applications specified by /cmdline.
■ runassrv.exe itself does not need to be placed in the system search path.
■ New control operation to send a control code to the specified service.
■ New listsrv operation to list all services and drivers, supporting many filtering conditions.
■ New -logfile and -loglevel options, with log recording function.
■ New -unstoppable option, the system service manager will refuse to stop a service installed with this option.
■ Memory contraction strategy, typically with memory overhead less than 300KB.
■ Solved the problem that the start / stop command is invalid on some systems.
≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡
A small thing written a few years ago, for everyone's amusement~
Run As Service
A tool to run any executable file (including batch files and scripts) as a system service
≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡
Introduction:
■ Run any executable file as a system service.
■ Originally mainly for porting some Linux daemons; can also be used to start any application and maintenance scripts.
■ Runs quietly, unless the Interactive mode is specified, no windows will pop up.
■ No need to log in, it runs automatically after the system starts, without waiting for the user to log in.
■ As a side function, it supports starting, stopping, and deleting any system service.
■ Completely take over the instructions of the system service manager (start, stop, etc.). After the running program terminates, it automatically submits the status to the service manager and exits by itself, without resident memory.
≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡
Help screen:
C:\Documents and Settings\Administrator>
#runassrv
===========================================================================
Run As Service Ver 1.1.0.625 by BaiYang / 2004 - 2006, 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.
pause - Pause a Service.
continue - Continue a paused Service.
control - Control a service by send it a op-code
listsrv - List all installed services on local system
listgrp - List all service load order groups on local system (by start
order).
-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 system!
-starttype - service start type, can be:
SystemStart
BootStart
AutoStart (DEFAULT)
DemandStart
Disabled
NOTE: set this option incorrectly may endanger your system!
-errctl - service error control policy, can be:
ErrorIgnore
ErrorNormal (DEFAULT)
ErrorSevere
ErrorCritical
NOTE: set this option incorrectly may endanger your system!
-group - specify service load order group
DEFAULT: none
-depen - names of services or load ordering groups that the system
must start before this service, delimited by '/'
DEFAULT: none
-user - specifies the name of the account under which the service
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
-unstoppable - make service unstoppable by system service control manager.
-opcode - for "control", specify the operation code.
-logfile - specify the logging target.
DEFAULT: don't log to file.
-loglevel - specify the lowest logging level, can be:
DebugOnly (Most Detail)
Info
Warning
Error (DEFAULT)
FatalError
Disabled (Close Logging Output)
===========================================================================
Special Options With "listsrv":
-name - list service name that match the wildcard pattern
DEFAULT: *
-dispname - service display name's wildcard pattern.
DEFAULT: *
-pid - service belong to specified process.
DEFAULT: any
-type - specify service types to be match, delimite by "/".
DEFAULT: any
-starttype - specify service starttypes to be match, delimite by "/".
DEFAULT: any
-group - service belong to the load order group
DEFAULT: any
-state - service's current state, can be:
active
inactive
DEFAULT: any
===========================================================================
Examples:
runassrv add /cmdline:"c:\tools\myapp.exe -arg1 -arg2" /name:"mysrv"
runassrv add /cmdline:myapp.exe /cmdline:yourapp.exe /name:mysrv
runassrv add /cmdline:notepad /cmdline:vi.bat /type:interactiveprocess /priority:AboveNormal /name:testsrv /logfile:C:\test.log /loglevel:debugonly /dispname:"My Test Service" /desc:"This is a Test Service"
runassrv start /name:wuauserv
runassrv stop /name:wuauserv
runassrv pause /name:iisadmin
runassrv control /name:wuauserv /opcode:1
runassrv listsrv /name:w*
runassrv listsrv /type:KernelDriver/FileSystemDriver
runassrv listsrv /starttype:SystemStart/BootStart
runassrv listsrv /group:pnp_tdi
runassrv listsrv /pid:1234
runassrv listgrp
≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡
Simple Chinese help:
C:\Documents and Settings\Administrator>
#runassrv
===========================================================================
Run As Service Ver 1.1.0.628 by BaiYang / 2004 - 2006, Freeware
===========================================================================
Run any executable program as a system service
Usage: runassrv <action> <options>
===========================================================================
Actions:
add - Add a service.
remove - Remove a service.
start - Start a service.
stop - Stop a service.
pause - Pause a service
continue - Continue a paused service.
control - Send a control code to the specified service.
listsrv - List all services and drivers that meet the conditions on the current system.
listgrp - List the priority order of all service startup groups on the current system.
-h - This help screen.
===========================================================================
Options:
-cmdline - When the service starts, specify which program you really want to run. This option can be used multiple times, each specifying an application to run. When the service starts, these applications will be executed concurrently.
-name - Specify the system service name (used for system operations such as net start, etc.).
-dispname - Specify the service display name that the user will see (the name seen in the service manager).
-desc - Specify the service description (the service description information seen in the service manager)
Default: None
-type - Specify the service type, which can be the following types:
FileSystemDriver : File system and driver, will be loaded before the kernel is loaded. Note that services at this level can hardly use any system APIs.
KernelDriver : Kernel-level driver, loaded immediately after the kernel is loaded. Services at this level can only use restricted APIs.
OwnProcess : Separate process service, standard service, started after the Win32 subsystem is ready, default.
ShareProcess : Shared process service, that is, several services share the same process. Many services relying on svchost use this type.
InteractiveProcess: Interactive service, the service can interact with the user. Except for this type, all other types of services cannot have a user-visible interface.
Note: Incorrectly setting this option may make the system unstable or even unable to start! If you don't know what you are doing, please don't try the first two items.
-starttype - Service startup type, including:
SystemStart : System-level startup, started after the kernel is initialized.
BootStart : Started by the system loader (before the kernel is initialized).
AutoStart : Start automatically, started after the Win32 subsystem is initialized, default.
DemandStart : Manual.
Disabled : Disabled.
Note: Incorrectly setting this option may make the system unstable or even unable to start! If you don't know what you are doing, please don't try the first two items.
-errctl - Specify the error handling strategy when the service has an error, which can be:
ErrorIgnore : Ignore the error, do not rescue the service, the system continues to run
ErrorNormal : Record to the system log and pop up a dialog box to prompt the user, default. (Default)
ErrorSevere : Record the log and pop up a prompt box. If the current system has run in the last correct startup configuration, ignore the error, otherwise automatically restart to the last correct configuration.
ErrorCritical : The same as above, but if restarting to the last correct configuration still fails to start this service, it will blue screen.
Note: Incorrectly setting this option may make the system unstable or even unable to start! If you don't know what you are doing, please don't try the last two items.
-group - Specify the startup priority group that the service belongs to. The priority group can be listed in order by listgrp.
Default: None
-depen - Specify the services that this service depends on. The services specified here must be started correctly before this service starts. Multiple services are separated by "/". Here, the system service name must be specified, not the name seen by the user.
Default: None
-user - Specify the user identity, that is, the user account that this service uses to run
Default: LocalSystem (local system, highest authority), interactive services must use this account.
-pass - Specify the user password
Default: None (LocalSystem)
-priority - The running priority of the program specified by the cmdline parameter, which can be (no need to explain this):
Idle
BelowNormal
Normal (Default)
AboveNormal
High
RealTime
-unstoppable - The system service manager will refuse to stop the service installed with this option.
-opcode - Specify the control code to be sent for the control command. The control code "1" is actually equivalent to the stop command, used to stop the service. Except for a few standard control codes, most control codes correspond to behaviors defined by the service itself.
-logfile - Specify the log file
Default: Do not record the log file
-loglevel - Specify the detail level of log recording, which can be:
DebugOnly (record all running details)
Info
Warning
Error (Default)
FatalError
Disabled (Close the log output to the console and file)
===========================================================================
Special options when using the listsrv command:
-name - Specify the wildcard of the service name to be listed
Default: *
-dispname - Specify the wildcard of the service display name to be listed
Default: *
-pid - Only list services running in the specified process
Default: All processes
-type - Only list services of the specified type, multiple service types are separated by "/"
Default: All types
-starttype - Only list services of the specified startup type, multiple types are separated by "/"
Default: All types
-group - Only list services in the specified startup group
Default: Any group
-state - Only list services whose current state meets the specified value, which can be:
active : The service is currently in an active state (starting, running, etc.)
inactive : The service is currently in an inactive state (stopped)
Default : Any
===========================================================================
Examples:
runassrv add /cmdline:"c:\tools\myapp.exe -arg1 -arg2" /name:"mysrv"
runassrv add /cmdline:myapp.exe /cmdline:yourapp.exe /name:mysrv
runassrv add /cmdline:notepad /cmdline:vi.bat /type:interactiveprocess /priority:AboveNormal /name:testsrv /logfile:C:\test.log /loglevel:debugonly /dispname:"My Test Service" /desc:"This is a Test Service"
runassrv start /name:wuauserv
runassrv stop /name:wuauserv
runassrv pause /name:iisadmin
runassrv control /name:wuauserv /opcode:1
runassrv listsrv /name:w*
runassrv listsrv /type:KernelDriver/FileSystemDriver
runassrv listsrv /starttype:SystemStart/BootStart
runassrv listsrv /group:pnp_tdi
runassrv listsrv /pid:1234
runassrv listgrp
===========================================================================
About the separator of commands and parameters:
All parameters are prefixed with "-" or "/"; parameters that need to be assigned use ":" or "=" as the assignment operator, for example: -name="mysrv"; /name:"mysrv"; -name:"mysrv", etc. combinations are all legal.
≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡
Copyright: Free software; the author is not responsible for anything. You can use it for any purpose, as long as you don't do bad things :)
≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡
Contact the author: http://www.cn-dos.net/forum or asbai@msn.com
Try to contact via the forum or email for things. But if you like playing StarCraft and are a noob with the same hand speed as me (no more than 100), welcome to add my MSN ^_^
Last edited by asbai on 2008-6-3 at 01:33 PM ]