Study Notes 1.2 Commonly used batch command

From two years ago, their own learning and their own series of 200 programs picked up today for the first 223, and essays in mind that the practical batch commands, how to say, in fact, did not much practical, save some steps right

// Code-00219 script, delete .bat
DEL / F / A / Q \\? \% 1

RD / S / Q \\? \% 1


//Code-00220 脚本,卸载.bat
@echo off
set name="Service KMSELDI"
sc stop %name%
sc delete %name%
set name="KMSServerService"
sc stop %name%
sc delete %name%
exit


Script // Code-00221, 3s restart .bat
@
echo OFF
the shutdown -r -t 3

// Code-00222 script, 2s off .bat
@
echo OFF
the shutdown -s -t 2

 

Specific operation is very simple, to those who want to use just put a .bat file name suffix directly used, and it is very convenient

Guess you like

Origin www.cnblogs.com/StrongAI/p/11568560.html