Download any executable files (including batches and scripts) as tools for system services

Source: Internet
Author: User
Tags error handling system log win32

Run as Service
A tool that runs any executable file (including batch and corner) as a system service
≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡
Introduced:
Run any executable file as a system service.
It started primarily to migrate some Linux daemon, or it could be used to start any application and Maintenance corner book.
Run quietly, unless you specify Interactive mode, no windows will pop up.
Without landing, the system automatically runs after startup without waiting for the user to log in.
As an incidental feature, it supports starting, stopping, and removing any system services.
Complete takeover of System Service Manager directives (start, stop, etc.). When a running program terminates, it automatically submits the state to the service manager and exits itself, leaving no memory resident.
≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡
Help screen:
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 the 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 is:
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 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 for your want to run, can is:
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"
≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡
Simple Chinese Help:
C:\Documents and Settings\administrator>
#runassrv
=======================================================================
Run as Service Ver 1.0.0.3 by baiyang/2004, freeware
=======================================================================
Run any executable program as a system service
Usage: Runassrv < actions > < options >
=======================================================================
Action:
-add-Add a new service.
-remove-Deletes a service.
-start-Start a service.
-stop-Stop a service.
-LISTGRP-Lists the order of precedence for all service startup groups in the current system.
-H-this help screen.
=======================================================================
Options:
-cmdline-When the service starts, specify what you really want to run the program.
-name-Specifies system service names (for system operations such as net start).
-dispname-Specifies the display name of the service that the user will see (the name that is seen in the service manager).
-desc-Specify a description of the service (service description information that is seen in the service manager)
Default: None
-type-Specifies the type of service that can be the following:
Filesystemdriver: File system and Driver, will be loaded before kernel loading, note
This level of service is almost impossible to use with any system APIs.
Kerneldriver: Kernel-level drive, the kernel loaded, immediately loaded, this
A level of service can only use a restricted API.
Ownprocess: Individual process service, standard service, in the WIN32 subsystem ready
After startup, default.
Shareprocess: Shared process services, where several services share the same process, many
This type is used by svchost-dependent services.
Interactiveprocess: Interactive services that can interact with the user, except for this class
Type, all other types of services are not available to users
See the interface.
Note: The wrong setting of this option may cause the system to become unstable or even fail to start! If
Do not know what you are doing, please do not try the first two.
-starttype-service startup type, including:
Systemstart: System-level startup, starting after kernel initialization.
Bootstart: Initiated by the system loader (before initialization of kernel).
AutoStart: Start automatically, WIN32 subsystem initialized after initialization, default.
Demandstart: Manual.
Disabled: Disabled.
Note: The wrong setting of this option may cause the system to become unstable or even fail to start! If
Do not know what you are doing, please do not try the first two.
-ERRCTL-Specifies the error handling policy when a service error occurs, which can be:
Errorignore: Ignore the error, do not save the service, the system continues to run
Errornormal: Logging to the System log, and a dialog box prompts the user, the default
Recognize. Default
Errorsevere: Log and eject the prompt box if the current system is already running on the
This error is ignored when the last properly started configuration, otherwise automatically
Reboot to the last known Good configuration.
Errorcritical: Ditto, but if you reboot to the last known Good configuration or start this
The service fails on the blue screen.
Note: The wrong setting of this option may cause the system to become unstable or even fail to start! If
Do not know what you are doing, please do not try the latter two.
-group-Specifies the boot priority group that the service belongs to, and the priority group can be listed sequentially by LISTGRP.
Default: None
-depen-Specifies the services on which this service depends, and the service specified here must be correct before the service is started
Start. "/" split between multiple services. This is to specify the system service name, not the user
See that name.
Default: None
-user-Specify the user's identity, that is, the service uses that user account to run
Default: LocalSystem (Local system, highest privilege), interactive service must use this
Account.
-pass-Specify user password
Default: None (LocalSystem)
The-priority-cmdline parameter specifies the program's running priority, which can be (this is not explained):
Idle
BelowNormal
Normal (DEFAULT)
AboveNormal
High
Realtime
=======================================================================
Example:
Runassrv/add/cmdline: "C:\tools\myapp.exe-arg1-arg2"/name: "Mysrv"/dispname: "Example Service"
Runassrv/listgrp
Runassrv/remove/name: "Mysrv"
=======================================================================
About the delimiters for commands and parameters:
All parameters are prefixed with "-" or "/" and need to be assigned a parameter with ":" or "=" as
Assignment operators, such as:-name= "Mysrv"; /name: "Mysrv"; -name: "Mysrv" and other combinations are
is legal.
≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡
Copyright: free software; The author assumes no responsibility whatsoever. You can use it for any purpose, as long as you don't do bad things.
≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡
Contact Author: http://www.cn-dos.net/forum or asbai@msn.com
Do something as far as possible forum or email contact. But if you like playing StarCraft and you're just as low as me (no more than 100), please add my MSN ^_^
Local Downloads

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.