要下载 https://github.com/sysprogs/WinCDEmu/releases 后将安装路径添加到系统环境变量
游戏主程序退出时自动卸载映像
@echo off echo must installed WinCDEmu and add it to the system environment variables !! ::镜像文件路径 set "cur_path=%CD%" set "iso_filename=DC3WY" set "gamename=DC3WY" set "iso_filepath=%cur_path%\%iso_filename%.ISO" ::挂载 echo MOUNT %iso_filepath% ! batchmnt "%iso_filepath%" ::等待挂载 choice /t 1 /d y /n >nul ::启动游戏 %gamename%.EXE :start choice /t 2 /d y /n >nul tasklist|find /i "%gamename%.EXE" if %errorlevel% NEQ 0 ( echo The %gamename% closes ! goto end ) goto start (循环) :end batchmnt /unmount "%iso_filepath%" echo UNMOUNTED %iso_filepath% ! choice /t 2 /d y /n >nul