How to install a windows service in command model ?

159 views
Skip to first unread message

longware

unread,
Apr 22, 2009, 10:04:27 AM4/22/09
to mongoose-users
i lost the mongoose's windows service
if i do not want reinstall it, How can i install a windows service in
command model ?
-----------------------------------------------------------------------------------------------------------
C:\mongoose-2.4>mongoose.exe -h
Mongoose version 2.4 (c) Sergey Lyubka
usage: mongoose.exe [options] [config_file]
-A <htpasswd_file> <realm> <user> <passwd>
-root Web root directory
-index_files Index files (default:
"index.html,index.htm,index.cgi")
-ssl_cert SSL certificate file
-ports Listening ports
-dir_list Directory listing (default: "yes")
-protect URI to htpasswd mapping
-cgi_ext CGI extensions (default: "cgi,pl,php")
-cgi_interp CGI interpreter to use with all CGI scripts
-ssi_ext SSI extensions (default: "shtml,shtm")
-auth_realm Authentication domain name (default: "mydomain.com")
-auth_gpass Global passwords file
-auth_PUT PUT,DELETE auth file
-access_log Access log file
-error_log Error log file
-aliases Path=URI mappings
-admin_uri Administration page URI
-acl Allow/deny IP addresses/subnets
-max_threads Maximum simultaneous threads to spawn (default: "100")
-----------------------------------------
i can not found it above. thank you !

Sergey Lyubka

unread,
Apr 22, 2009, 11:05:15 AM4/22/09
to mongoos...@googlegroups.com
Start command prompt and enter the following command:
sc create "Mongoose" binpath= c:\path\to\mongoose.exe start= auto depend= Tcpip

Enter exactly as given. Note the whitespaces after the equal signs.

longware

unread,
Apr 23, 2009, 12:10:45 AM4/23/09
to mongoose-users
ok, very good ,thanks,just use sc command,i have never use it before.

C:\>sc
DESCRIPTION:
SC is a command line program used for communicating with the
NT Service Controller and services.
USAGE:
sc <server> [command] [service name] <option1> <option2>...

The option <server> has the form "\\ServerName"
Further help on commands can be obtained by typing: "sc
[command]"
Commands:
query-----------Queries the status for a service, or
enumerates the status for types of services.
queryex---------Queries the extended status for a service,
or
enumerates the status for types of services.
start-----------Starts a service.
pause-----------Sends a PAUSE control request to a service.
interrogate-----Sends an INTERROGATE control request to a
service.
continue--------Sends a CONTINUE control request to a
service.
stop------------Sends a STOP request to a service.
config----------Changes the configuration of a service
(persistant).
description-----Changes the description of a service.
failure---------Changes the actions taken by a service upon
failure.
sidtype---------Changes the service SID type of a service.
qc--------------Queries the configuration information for a
service.
qdescription----Queries the description for a service.
qfailure--------Queries the actions taken by a service upon
failure.
qsidtype--------Queries the service SID type of a service.
delete----------Deletes a service (from the registry).
create----------Creates a service. (adds it to the
registry).
control---------Sends a control to a service.
sdshow----------Displays a service's security descriptor.
sdset-----------Sets a service's security descriptor.
showsid---------Displays the service SID string
corresponding to an ar
bitrary name.
GetDisplayName--Gets the DisplayName for a service.
GetKeyName------Gets the ServiceKeyName for a service.
EnumDepend------Enumerates Service Dependencies.

The following commands don't require a service name:
sc <server> <command> <option>
boot------------(ok | bad) Indicates whether the last boot
should
be saved as the last-known-good boot
configuration
Lock------------Locks the Service Database
QueryLock-------Queries the LockStatus for the SCManager
Database
EXAMPLE:
sc start MyService
Reply all
Reply to author
Forward
0 new messages