Script used to determine whether the service is started

Source: Internet
Author: User
Script @ echoofffor/f & quot; skip3tokens4 & quot; % iin (& amp; #39; scqueryWebClient & amp; #39;) doset & quot; zt % I & quot; & amp; goto: next: nextif/I & quot; % zt % & quot; RUNN determines whether the service is started by the script @ echo off for/f "skip = 3 tokens = 4" % I in ('SC query webclient ') do set "zt = % I" & goto: next if/I "% zt %" = "RUNNING" (echo this service is RUNNING, will not perform any operation) else (echo this service is now processing stopped, will start net start WebClient)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.