|
本帖最后由 CodeHz 于 2021-1-9 23:24 编辑
smart.zip
(9.26 KB, 下载次数: 17)
那么大概就是这个了,有问题明天修(
附上32位/64位兼容batch(主要提供给仅64位支持的pe用)
- @echo off
- setlocal enableextensions enabledelayedexpansion
- 2>nul call :set_arch_%PROCESSOR_ARCHITECTURE%
- if errorlevel 1 (goto :unsupported_arch) else (goto :start)
- exit /b
- :set_arch_AMD64
- set ARCH=x86_64
- exit /b
- :set_arch_x86
- set ARCH=i386
- exit /b
- :unsupported_arch
- echo Unsupported architecture: %PROCESSOR_ARCHITECTURE%
- exit /b
- :start
- smartmountfirmware-%ARCH% %*
- endlocal
复制代码
用法:smartmountfirmware mount即可获得一个盘符smartmountfirmware unmount即可取消挂载
smartmountfirmware dump用于调试目的
不想要调试输出可以用 2<nul smartmountfirmware mount 的方式去掉
也可以在批处理里拿到输出
for /f usebackq %%i in (`2^<nul smartmountfirmware mount`) do set DRIVE=%%i
|
|