Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
批处理,一件加载ISO至指定盘符,适用于Gandalf那个PE
#1
使用VENTOY启动Gandalf PE之后。并不能自动加载ISO至Y盘。于是写了个批处理。利用Gandalf PE卷标“Win10PESE” 自动加载ISO同时调整至Y盘盘符

批处理需要和ISO放置同一路径。同时需要修改ISO文件名

@echo off & setlocal enabledelayedexpansion


cd /d "%~dp0"
SET CurDir=%CD%

explorer.exe "%CurDir%\Windows_PE_Gandalf_tools.iso"

ping 127.1 -n 5 >nul

for %%i in (Z Y X W V U T S R Q P O N M L K J I H G F E D C) do (
  vol %%i:|findstr "Win10PESE">nul&& set drivername=%%i:\)


mountvol >%CurDir%\volname.txt

for /f "delims=" %%j in ('type "%CurDir%\volname.txt"') do (
set "str=%%j"
>>$ echo,!str: =!
)
move $ "%CurDir%\volname.txt" >nul

for /f "delims=" %%c in (%CurDir%\volname.txt) do if "%%c"=="%drivername%" (set guid=!char! &goto :end) else (set char=%%c)


:end
echo %drivername%
echo %guid%
echo y | del %CurDir%\volname.txt
mountvol %drivername% /D
mountvol Y:\ %guid%
pause >nul
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)