回复 1# 15158795291 - @echo off
- %1 mshta vbscript:CreateObject("Shell.Application").ShellExecute("""cmd""","/c """"%~f0"""" ::",,"runas",1)(close) & exit /b
-
- setlocal enabledelayedexpansion
- REM 查找.exe路径
- set "keyPath=HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths"
- set "exeName=HC Touch VPro.exe"
- set "foundPath="
- set "softwarePath="
- for /f "tokens=*" %%a in ('reg query "%keyPath%" /s /f "%exeName%" /k 2^>nul') do (
- set "thePath=%%a"
- if "!thePath:~-1!"=="\" set "thePath=!thePath:~0,-1!"
- for /f "tokens=2,*" %%b in ('reg query "!thePath!" /ve 2^>nul') do (
- set "type=%%b"
- set "value=%%c"
- if "!type!"=="REG_SZ" (
- set "foundPath=!value!"
- goto :endSearch
- )
- )
- )
-
- :endSearch
- set "softwarePath=!foundPath!"
- echo !softwarePath!
- pause
复制代码
|