Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Solved 隐藏EFI盘符 Hidden EFI volume
#1
每次看到EFI盘符很不爽,想着隐藏掉,以下保存为批处理.bat格式,右键,管理员身份运行
save to .bat and run as admin

Code:
@echo off
setlocal enabledelayedexpansion
if exist %temp%\ventoy_vol.txt (
    del %temp%\ventoy_vol.txt
)
if exist %temp%\ventoy_diskpart_cmd.txt (
    del %temp%\ventoy_diskpart_cmd.txt
)
echo list volume >%temp%\ventoy_diskpart_cmd.txt
diskpart /s %temp%\ventoy_diskpart_cmd.txt |findstr /i VTOYEFI >%temp%\ventoy_vol.txt
echo Find Volume:
type %temp%\ventoy_vol.txt
for /f "tokens=1,2,3" %%a in (%temp%/ventoy_vol.txt) do (
    set "volumeNumber=%%b"
    set "volumeLetter=%%c"
    echo volumeNumber: !volumeNumber!
    echo volumeLetter: !volumeLetter!
)
if "!volumeNumber!" EQU "" (
    echo 未找到目标卷标编号,即将退出 volumeNumber not found
    ping -n 5 127.0.0.1>nul
    exit
)
if "!volumeLetter!" EQU "" (
    echo 未找到目标驱动器号,即将退出 volumeLetter not found
    ping -n 5 127.0.0.1 >nul
    exit
)
rem echo select volume !volumeNumber!
rem echo remove letter=!volumeLetter!
echo select volume !volumeNumber! >%temp%\ventoy_diskpart_cmd.txt
echo remove letter=!volumeLetter! >>%temp%\ventoy_diskpart_cmd.txt
diskpart /s %temp%\ventoy_diskpart_cmd.txt
echo 隐藏完毕 Done.
del %temp%\ventoy_diskpart_cmd.txt
del %temp%\ventoy_vol.txt

save to delete_volume_with_label.bat or what you like.
Reply
#2
excellent
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)