Запуск служб из командной строки

%3CLINGO-SUB%20id%3D%22lingo-sub-1080573%22%20slang%3D%22en-US%22%3E%D0%97%D0%B0%D0%BF%D1%83%D1%81%D0%BA%20%D1%81%D0%BB%D1%83%D0%B6%D0%B1%20%D0%B8%D0%B7%20%D0%BA%D0%BE%D0%BC%D0%B0%D0%BD%D0%B4%D0%BD%D0%BE%D0%B9%20%D1%81%D1%82%D1%80%D0%BE%D0%BA%D0%B8%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1080573%22%20slang%3D%22en-US%22%3E%3CP%3E%D0%94%D0%BE%D0%B1%D1%80%D1%8B%D0%B9%20%D0%B4%D0%B5%D0%BD%D1%8C.%3CBR%20%2F%3E%D0%9F%D0%BE%D0%BC%D0%BE%D0%B3%D0%B8%D1%82%D0%B5.%3C%2FP%3E%3CP%3E%D0%A1%D1%82%D0%BE%D0%B8%D1%82%20%D0%B7%D0%B0%D0%B4%D0%B0%D1%87%D0%B0%20%D0%BE%D1%81%D1%82%D0%B0%D0%BD%D0%BE%D0%B2%D0%B8%D1%82%D1%8C%20%D1%81%D0%BB%D1%83%D0%B6%D0%B1%D1%83.%20%D0%A3%D0%B1%D0%B5%D0%B4%D0%B8%D1%82%D1%8C%D1%81%D1%8F%2C%20%D1%87%D1%82%D0%BE%20%D0%BE%D0%BD%D0%B0%20%D1%81%D1%82%D0%BE%D0%B8%D1%82.%3CBR%20%2F%3E%D0%A7%D0%B5%D1%80%D0%B5%D0%B7%20%D0%B2%D1%80%D0%B5%D0%BC%D1%8F%20%D0%B7%D0%B0%D0%BF%D1%83%D1%81%D1%82%D0%B8%D1%82%D1%8C.%20%D0%A3%D0%B1%D0%B5%D0%B4%D0%B8%D1%82%D1%8C%D1%81%D1%8F%2C%20%D1%87%D1%82%D0%BE%20%D0%B7%D0%B0%D0%BF%D1%83%D1%81%D1%82%D0%B8%D0%BB%D0%B0%D1%81%D1%8C.%3C%2FP%3E%3CP%3E%D0%9A%D1%80%D0%BE%D0%BC%D0%B5%20%D0%BA%D0%B0%D0%BA%20%D1%81%20%D0%BF%D0%BE%D0%BC%D0%BE%D1%89%D1%8C%D1%8E%3CBR%20%2F%3Esc%20stop%20_SRV_%20%26gt%3B%26gt%3Bd%3A%5C_SRV_.txt%3CBR%20%2F%3Esc%20start%20_SRV_%20%26gt%3B%26gt%3B%26gt%3Bd%3A%5C_SRV_-%D0%B4%D0%B0.%D1%84%D0%BE%D1%80%D0%BC%D0%B0%D1%82%20txt%3C%2FP%3E%3CP%3E%D0%BD%D0%B5%20%D0%BF%D1%80%D0%B8%D0%B4%D1%83%D0%BC%D0%B0%D0%BB.%20%D0%9D%D0%BE%20%D0%BA%D0%B0%D0%BA-%D1%82%D0%BE%20%D0%BD%D0%B5%20%D0%B2%D1%81%D0%B5%D0%B3%D0%B4%D0%B0%20%D0%BA%D0%BE%D1%80%D1%80%D0%B5%D0%BA%D1%82%D0%BD%D0%BE%20%D0%BD%D0%B0%20Windows%20Server%202008R2%20%D0%BE%D1%82%D1%80%D0%B0%D0%B1%D0%B0%D1%82%D1%8B%D0%B2%D0%B0%D0%B5%D1%82.%3C%2FP%3E%3C%2FLINGO-BODY%3E
Highlighted
Occasional Visitor

Добрый день.
Помогите.

Стоит задача остановить службу. Убедиться, что она стоит.
Через время запустить. Убедиться, что запустилась.

Кроме как с помощью
sc stop _SRV_ >>d:\_SRV_.txt
sc start _SRV_ >>>d:\_SRV_-да.формат txt

не придумал. Но как-то не всегда корректно на Windows Server 2008R2 отрабатывает.

0 Replies