盘符問題
盘符是隨機的批处理要如何写
@echo off
echo select vdisk file="c:\100.vhd" >vhdsel
echo attach vdisk>>vhdsel
echo list disk>>vhdsel
diskpart /s vhdsel
del /f /q vhdsel
timeout /t 2
start盘符:\123\123.exe
echo select vdisk file="c:\100.vhd" >vhdsel
echo detach vdisk>>vhdsel
echo list disk>>vhdsel
diskpart /s vhdsel
del /f /q vhdsel
exit 全盘搜索 for /f %%a in ('mountvol ^| findstr /r /c:"\<\:\\\>"') do if exist %%a123\123.exe start %%a123\123.exe
页:
[1]