|
|
@echo off
Color 0A
pushd %~dp0
cd "%~dp0"
if exist "%LOCALAPPDATA%\Microsoft\Edge SxS\Application\msedge.exe" set edge=%LOCALAPPDATA%\Microsoft\Edge SxS\Application\msedge.exe
if exist "%ProgramFiles(x86)%\Microsoft\Edge Dev\Application\msedge.exe" set edge=%ProgramFiles(x86)%\Microsoft\Edge Dev\Application\msedge.exe
if exist "%ProgramFiles(x86)%\Microsoft\Edge Beta\Application\msedge.exe" set edge=%ProgramFiles(x86)%\Microsoft\Edge Beta\Application\msedge.exe
if exist "%LOCALAPPDATA%\Microsoft\Edge SxS\Application\msedge.exe" set edge=%LOCALAPPDATA%\Microsoft\Edge SxS\Application\msedge.exe
if exist "%ProgramFiles(x86)%\Microsoft\Edge\Application\msedge.exe" set edge=%ProgramFiles(x86)%\Microsoft\Edge\Application\msedge.exe
reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\edge.exe" /ve /t REG_SZ /d "C:\Program Files (x86)\Microsoft\Edge\Application\msedge.exe" /f
reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\edge.exe" /v "Path" /t REG_SZ /d "C:\Program Files (x86)\Microsoft\Edge\Application" /f
我想把%edge%这个变量的文件路径截取C:\Program Files (x86)\Microsoft\Edge\Application为这样不知道怎么写批处理?????????? |
|