versiones guia español actualizar windows windows-services

windows - guia - qgis español



Modificación de la "Ruta al ejecutable" de un servicio de Windows (7)

Abra Ejecutar (win + R), escriba "Regedit.exe", para abrir "Editor del Registro", vaya a

HKEY_LOCAL_MACHINE / System / CurrentControlSet / Services

busque " Apache2.4 " abra la carpeta, busque " ImagePath " en el lado derecho, abra "ImagePath" en " value Data " y coloque la siguiente ruta:

"C: / xampp / apache / bin / httpd.exe" -k runservice foe XAMPP para otros puntos a la ubicación donde está instalado Apache y dentro de la carpeta de basura "C: (ubicación de Apache instalada) / bin / httpd.exe" -k se ejecuta servicio

Me gustaría modificar la ruta de acceso a mi aplicación, pero hacerlo se rompe porque el servicio todavía apunta a la ubicación anterior.

Al ir a Administrative Tools > Services , puede abrir un cuadro de diálogo de propiedades y ver la Path to executable , pero no hay forma de cambiarlo.

¿Hay alguna forma en que un usuario pueda modificar la ruta del servicio sin tener que reinstalar la aplicación?


Implica editar el registro, pero la información de servicio se puede encontrar en HKEY_LOCAL_MACHINE/System/CurrentControlSet/Services . Encuentre el servicio que desea redireccionar, ubique la subclave ImagePath y cambie ese valor.


No puedes editar directamente tu ruta para ejecutar un servicio. Para eso puedes usar el comando sc,

SC CONFIG ServiceName binPath= "Path of your file"

P.ej:

sc config MongoDB binPath="I:/Programming/MongoDB/MongoDB/bin/mongod.exe --config I:/Programming/MongoDB/MongoDB/bin/mongod.cfg --service"


Puedes eliminar el servicio:

sc delete ServiceName

Luego recrea el servicio.


También puedes hacerlo con PowerShell:

Get-WmiObject win32_service -filter "Name=''My Service''" ` | Invoke-WmiMethod -Name Change ` -ArgumentList @($null,$null,$null,$null,$null, ` "C:/Program Files (x86)/My Service/NewName.EXE")

O:

Set-ItemProperty -Path "HKLM:/System/CurrentControlSet/Services/My Service" ` -Name ImagePath -Value "C:/Program Files (x86)/My Service/NewName.EXE"


También se ve este enfoque en SuperUser, que usa la línea de comandos sc lugar de modificar el registro:

sc config <service name> binPath= <binary path>

Nota: el espacio después de binPath= es importante. También puede consultar la configuración actual usando:

sc qc <service name>

Esto muestra una salida similar a:

[SC] QueryServiceConfig SUCCESS

SERVICE_NAME: ServiceName

TYPE : 10 WIN32_OWN_PROCESS START_TYPE : 2 AUTO_START ERROR_CONTROL : 1 NORMAL BINARY_PATH_NAME : C:/Services/ServiceName LOAD_ORDER_GROUP : TAG : 0 DISPLAY_NAME : <Display name> DEPENDENCIES : SERVICE_START_NAME : user-name@domain-name


Un poco más profundo con el comando ''SC'', podemos extraer todo el ''Nombre del Servicio'' y obtuvimos todo el ''QueryServiceConfig'' :)

>SC QUERY > "%computername%-services.txt" [enter] >FIND "SERVICE_NAME: " "%computername%-services.txt" /i > "%computername%-services-name.txt" [enter] >NOTEPAD2 "%computername%-services-name.txt" [enter]

Realice la edición NOTEPAD2 ''pequeña'' ..

Luego, continúa con ''CMD'' ..

>FOR /F "DELIMS= SKIP=2" %S IN (''TYPE "%computername%-services-name.txt"'') DO @SC QC "%S" >> "%computername%-services-list-config.txt" [enter] >NOTEPAD2 "%computername%-services-list-config.txt" [enter]

Los datos sin procesar están listos para alimentar el ''archivo por lotes futuro'', por lo que el resultado se ve así a continuación.

+ -------------+-------------------------+---------------------------+---------------+--------------------------------------------------+------------------+-----+----------------+--------------+--------------------+ | SERVICE_NAME | TYPE | START_TYPE | ERROR_CONTROL | BINARY_PATH_NAME | LOAD_ORDER_GROUP | TAG | DISPLAY_NAME | DEPENDENCIES | SERVICE_START_NAME | + -------------+-------------------------+---------------------------+---------------+--------------------------------------------------+------------------+-----+----------------+--------------+--------------------+ + WSearch | 10 WIN32_OWN_PROCESS | 2 AUTO_START (DELAYED) | 1 NORMAL | C:/Windows/system32/SearchIndexer.exe /Embedding | none | 0 | Windows Search | RPCSS | LocalSystem | + wuauserv | 20 WIN32_SHARE_PROCESS | 2 AUTO_START (DELAYED) | 1 NORMAL | C:/Windows/system32/svchost.exe -k netsvcs | none | 0 | Windows Update | rpcss | LocalSystem |

Pero, HTML será bastante más fácil: D

Cualquier idea brillante para mejorar es bienvenida V ^ _ ^