Windows 搜索指定软件启动路径

Windows 搜索指定软件启动路径

通过指定软件名称,使用命令搜索软件安装路径

# 示例:搜索“钉钉”的启动路径
@echo off
rem 指定待搜索的文件
set "FileName=DingTalk.exe"
rem echo 正在搜索,请稍候...
for %%a in (C D E F G H I J K L M N O P Q R S T U V W X Y Z) do (
  if exist %%a:\ (
    pushd %%a:\
    for /r %%b in (*%FileName%) do (
      if /i "%%~nxb" equ "%FileName%" (
        echo,%%b
      )
    )
    popd
  )
)

在这里插入图片描述

 
 
 
 
 

猜你喜欢

转载自blog.csdn.net/D1179869625/article/details/132271806
今日推荐