(From: http://www.et8.net/bbs/showthread.php? T = 763159)
Run as service-use any executable file (including batch processing and badge) as a tool for running system services
Features
- Run any executable file as a system service.
- It is mainly used to port some Linux daemon; it can also be used to start any application.ProgramAnd maintainability.
- Run quietly. No window is displayed unless interactive mode is specified.
- No login required. The system runs automatically after startup and does not need to wait for the user to log on.
- As a feature, you can start, stop, and delete any system service.
- Complete commands for taking over the System Service Manager (start, stop, and so on ). After the program is terminated, it automatically submits the status to the Service Manager and exits without resident memory.
Update
Added the graphic interface front-end funded by ccainiao senior. The runasservice.rar in the attachment is as follows:
Clipboard 02.png
Thanks again to Brother ccainiao for his continuous humanitarian Donation
Content added for version 1.1.2.803)
- If multiple/cmdline parameters are specified, the user commands will be executed one by one in the order specified by/cmdline when the service is started.
- Each USER command will be executed only after the previous/cmdline command is ready, ensuring that the dependency-related commands can run normally. (See "about execution readiness ")
- Set the default "current working directory" parameter for each command. For example, if you run the command "/cmdline: C: \ test \ app.exe", the current working directory of the command will be set to "C: \ test \", ensure that the application can normally access configuration information and private data.
■ Execution ready ■ for Command Line Programs (including batch processing and corner books), execution ready means that the standard input/output device has been initialized, the main program entry (main () has been entered. For graphic interface programs, the execution is ready, which means that the main form registration and initialization are complete, and the program has waited for messages to be received in the main loop.
Content added for version 1.1.1.628)
- No prefix is required for all actions (such as Add/Remove.
- Added the pause/continue operation.
- Now, a runassrv service can run multiple applications specified by the/cmdline concurrently.
- Runassrv.exe does not need to be placed in the system search path.
- Adds a control operation to send control codes to a specified service.
- Added the listsrv operation to list all services and drivers. Multiple filter conditions are supported.
- Added the-logfile and-loglevel options and logging functions.
- New-the unstoppable System Service Manager rejects the service installed with this option.
- Memory shrinkage policy. In typical cases, the memory overhead is less than kb.
Help Screen
Code :
C: \ Documents and Settings \ Administrator> # runassrv ============================== ========================================================== ==== run as service ver 1.1.2.803 by running Yang/2004-2006, freeware ==================================================== ========================================== run any program A serviceusage: runassrv <action> <options >==================================== ========================================================== = Ctions: 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: -Define line-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) using process interactiveprocess Note: set this option incorre Ctly 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 shold run. default: LocalSystem-pass-contains the password to the account name default: None-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 "/". default: Any-starttype-specify service starttypes to be match, delimite "/". 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 internal control/Name: runtime/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 code:
C: \ Documents and Settings \ Administrator> # runassrv ============================== ========================================================== ==== run as service ver 1.1.2.803 by running Yang/2004-2006, freeware ==================================================== ========================================== use a program as a system service: runassrv <action> <option> ================================ ========================================================== = action: add-Add a service. remove -Delete a service. start-start a service. stop-stop a service. pause-suspend a service continue-continue a suspended service. control-send a control code to the specified service. listsrv-list all services and drivers that meet the conditions in the current system. listgrp-lists the priority order of all service start groups in the current system. -H-this help screen. ========================================================== ============================================ option: -cmdline-when the service is started, specify the program you really want to run. this option can be used multiple times, and each of them specifies an application to be run. When the service is started, these applications are executed concurrently. -Name-specify the system service name (for system operations such as net start ). -dispname-specify the name of the service to be viewed by the user (the name displayed in service manager ). -Desc-specify the service description (the service description information displayed in the Service Manager). Default Value: None-type-specify the service type, which can be filesystemdriver: File System and driver, it will be loaded before the kernel is loaded. Note that this level of service can hardly use any system API. Kerneldriver: A kernel-level driver that is immediately loaded after the kernel is loaded. Services at this level can only use restricted APIs. Ownprocess: independent process service, standard service, started after Win32 subsystem ready, default. Worker Process: a shared process service. Several services share the same process. Many services that depend on svchost use this type. Interactiveprocess: an interactive service that can interact with users. In addition to this type, all types of services cannot have interfaces that users can see. Note: incorrect settings may make the system unstable or even fail to start! If you do not know what you are doing, do not try the first two items. -Starttype-Service Startup type, including systemstart: system-level startup, Which is started after kernel initialization. Bootstart: started by the system loader (before kernel initialization ). Autostart: auto start. It is started after the Win32 subsystem Initialization is complete. Default Value. Demandstart: manual. Disabled: Disabled. Note: incorrect settings may make the system unstable or even fail to start! If you do not know what you are doing, do not try the first two items. -Errctl-specifies the error handling policy when a service error occurs. It can be errorignore, which ignores the error and does not save the service. The system continues to run errornormal: records the error to the system log, in addition, a dialog box is displayed, prompting you to click "OK. (Default) errorsevere: record the log and a prompt box is displayed. If
Uploaded attachment
|
Runassrv.rar (118.5 kb, 393 views) |
|
Runasservice.rar (15.8 kb, 97 views) |