Un po 'più in profondità con il comando 'SC', siamo in grado di estrarre tutti 'Servizi Nome' e ottenuto all '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]
Do 'piccola' editing notepad2 .. 0.123.
Quindi, continuare 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]
dati grezzi è pronto per l'alimentazione di 'file batch futuro' in modo che il risultato è simile a questo qui sotto !!!
+ -------------+-------------------------+---------------------------+---------------+--------------------------------------------------+------------------+-----+----------------+--------------+--------------------+
| 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 |
Ma, HTML sarà piuttosto facile: D
qualche idea brillante per il miglioramento sono i benvenuti V^_^
fonte
2017-10-27 14:16:38
Consiglierei questo approccio sulle modifiche dirette del registro. Molti percorsi richiedono stringhe tra virgolette, che è possibile immettere come segue, ad esempio con MS SQL Server: 'sc config mssqlserver binPath =" \ "F: \ SQL DATA \ MSSQL10.MSSQLSERVER \ MSSQL \ Binn \ sqlservr.exe \" -sMSSQLSERVER "' –
Probabilmente è anche un po 'più bello in uno script di distribuzione rispetto all'approccio di modifica del registro diretto. –
Dolce. Più pulito del mucking in reg. ** Nota: per vedere la modifica è necessario chiudere e aprire services.msc. – yonsk