Microsoft Windows XP [版本 5.1.2600]
(C) 版权所有 1985-2001 Microsoft Corp.
C:\Program Files\Sandboxie>"C:\Documents and Settings\*********\桌面\runassrv
.exe"
===========================================================================
Run As Service Ver 1.1.2.803 by BaiYang / 2004 - 2006, Freeware
===========================================================================
Run any program(s) 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(s) you want to run. you
can specify multiple instance, all such instances will running
concurrently when the service has start.
-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 /priori
ty: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 listsrv /name:a* /type:KernelDriver
runassrv listgrp |