tengo el siguiente problema trato de un programa hacerlo un servicio en cmd ejecutado como administrador pongo esto:
sc create ezproxy binpath=C:\Program Files (x86)\ezProxy\ezEngine.exe type=interact type=own start=auto displayname="Proxy"
I cuando le doy me sale esto
C:\Windows\system32>sc create ezproxy binpath=C:\Program Files (x86)\ezProxy\ezEngine.exe type=interact type=own start=auto displayname="Proxy"
DESCRIPTION:
Creates a service entry in the registry and Service Database.
USAGE:
sc <server> create [service name] [binPath= ] <option1> <option2>...
OPTIONS:
NOTE: The option name includes the equal sign.
A space is required between the equal sign and the value.
type= <own|share|interact|kernel|filesys|rec>
(default = own)
start= <boot|system|auto|demand|disabled|delayed-auto>
(default = demand)
error= <normal|severe|critical|ignore>
(default = normal)
binPath= <BinaryPathName>
group= <LoadOrderGroup>
tag= <yes|no>
depend= <Dependencies(separated by / (forward slash))>
obj= <AccountName|ObjectName>
(default = LocalSystem)
DisplayName= <display name>
password= <password>
C:\Windows\system32>
Alguien me puede ayudar como crear un servicio.
Saludos Unix.
Cómo esperas que funcione, no se pueden delimitar correctamente los argumentos, es decir, debes encerrar la ruta que contiene espacios en el valor del parámetro binpath.
binpath="C:\Program Files (x86)\ezProxy\ezEngine.exe"
...De hecho, para seguir buenas prácticas, deberías encerrar todos los argumentos ya contengan espacios o no (cómo has hecho con el último argumento) .
Saludos!
Hola gracias por responderme pues le cuento con con comillas o sin ellas me da el mismo error
C:\Windows\system32>sc create ezproxy binpath= "C:\Program Files (x86)\ezProxy\ezEngine.exe" type=interact type=own start=auto displayname="Proxy"
DESCRIPTION:
Creates a service entry in the registry and Service Database.
USAGE:
sc <server> create [service name] [binPath= ] <option1> <option2>...
OPTIONS:
NOTE: The option name includes the equal sign.
A space is required between the equal sign and the value.
type= <own|share|interact|kernel|filesys|rec>
(default = own)
start= <boot|system|auto|demand|disabled|delayed-auto>
(default = demand)
error= <normal|severe|critical|ignore>
(default = normal)
binPath= <BinaryPathName>
group= <LoadOrderGroup>
tag= <yes|no>
depend= <Dependencies(separated by / (forward slash))>
obj= <AccountName|ObjectName>
(default = LocalSystem)
DisplayName= <display name>
password= <password>
Algun otra propuesta Saludos.
Pues a mi me funciona correctamente:
Citarsc create ezproxy binpath= "C:\Program Files (x86)\ezProxy\ezEngine.exe" type=interact type=own start=auto displayname="Proxy"
[SC] CreateService CORRECTO
Qué extraño :-\.
¿Qué versión de Windows estás utilizando?.
EDITO: Ya me dí cuenta del motivo:
Aparte de la necesidad de encerrar los argumentos con espacios (esto es una regla general), en tu versión de Windows al parecer es necesario dejar un espacio entre el símbolo "=", cómo te está indicando el error:
CitarNOTE: The option name includes the equal sign.
A space is required between the equal sign and the value.
Esto te debería funcionar:
SC.exe Create "ezproxy" binpath= "%ProgramFiles(x86)%\ezProxy\ezEngine.exe" type= "interact" type= "own" start= "auto" displayname= "Proxy"
Ten en cuenta que la sintaxis de muchos comandos tienen sus diferencias entre las distintas versiones de Windows, yo lo testeé bajo Windows 8.1.
Saludos!
Yo Windows 7 Ultimate.
Saludos.