分类 Windows 下的文章

1、快捷键Ctrl+R打开“运行”,输入regedit打开注册表

2、找到\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run

3、右键“新建”,选择字符串值

4、名称根据实际情况填写,完成后双击填写数值数据,这里填要启动的可执行文件或脚本即可

支持。

单行语法:

set varA=B
if "%varA%"=="A" (echo %varA% is A) else if "%varA%"=="B" (echo %varA% is B) else (echo %varA% is C)

换行语法:

set varA=B
if "%varA%"=="A" (
    echo %varA% is A
    echo AAA
) else if "%varA%"=="B" (
    echo %varA% is B
    echo BBB
) else (
    echo %varA% is C
    echo CCC
)

换行加强版:

etlocal EnableDelayedExpansion
set option=2
set sum=-1

if %option% == 3 ( 
  echo three 
  set /a sum=%option%*%option%*%option%
) ^
else if %option% == 2 ( 
  echo two 
  set /a sum=2*%option%
) ^
else if %option% == 1 ( 
  echo one 
  set /a sum=%option% 
) ^
else ( 
  echo zero 
  set /a sum=0 
)

echo sum = !sum!