首页 > 技术文章 > Windows常用命令笔记

herui1991 2020-02-14 14:04 原文

Windows常用命令笔记

:: 杀死应用程序进程
taskkill /f /t /im QQ.exe


:: 根据进程号找到对应的进程名称(假设9527为一个应用程序的进程号)
tasklist|findstr "9527"


:: 启动PC版微信(假设微信安装目录为:D:\Program Files (x86)\Tencent\WeChat)
start /d "D:\Program Files (x86)\Tencent\WeChat\" WeChat.exe

:: sc 命令
:: 手动
sc config service_name start= demand
:: 自动
sc config service_name start= auto
:: 禁用
sc config service_name start= disabled
:: 开启服务
sc start service_name
:: 停止服务            
sc stop service_name
:: 查看服务状态
sc query service_name
:: 删除服务
sc delete  service_name 
:: 查看服务的配置信息                                                
sc qc service_name            
:: 创建服务
sc create scname binPath=service.exe

:: e.g 将PC版微信添加到开机启动中
SC create myService binpath= D:\Program Files (x86)\Tencent\WeChat\WeChat.exe start= auto

 

推荐阅读