批处理 细节记录

@echo off 从当前命令行开始起不输出到屏幕上

pause 暂停处理

:top 跳转锚点 和 goto top 跳转到锚点

 

根据选择跳转到锚点

choice /c:123 /m "1:a,2:b,3:c"

if errorlevel 3 goto push
if errorlevel 2 goto sync
if errorlevel 1 goto main

 

sc \\xxx.xx.xx.xxx start "Service A" 远程启动服务

sc \\xxx.xx.xx.xxx stop "Service B" 远程停止服务

taskkill /s xxx.xx.xx.xxx /u 账号 /p 密码 /IM xxx.exe 杀掉进程

 

net use \\xxx.xx.xx.xxx\目录 密码 /user:账号 建立连接

copy xxx.config \\xxx.xx.xx.xxx\路径 /y 复制文件

 

posted @ 2015-04-27 09:15  xachary  阅读(155)  评论(0编辑  收藏  举报