File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -32,10 +32,9 @@ goto :eof
3232
3333:sub
3434setlocal enabledelayedexpansion
35- for /F " skip=1 tokens=*" %%a in ('WMIC LOGICALDISK where " volumename like '%~1 '" get deviceid 2^ > NUL ') do if not defined id set id = %%a
36- call set " deviceid = %% id: =%% "
37- if not " %deviceid% " == " " (
38- %~dp0 busybox.exe cp -f %SRC_PARSE% %deviceid%
39- if !errorlevel! == 0 (echo Upload complete on %1 ^ (%deviceid% ^ ))
35+ for /F " delims=" %%a in ('powershell -nologo -command ^
36+ " Get-CimInstance -ClassName 'Win32_LogicalDisk' -Filter 'DriveType = 2' | Where-Object { $_.VolumeName -eq '%~1 ' } | Select-Object -ExpandProperty DeviceID" 2^ > NUL ') do if not " %%a " == " " (
37+ %~dp0 busybox.exe cp -f %SRC_PARSE% %%a
38+ if !errorlevel! == 0 (echo Upload complete on %1 ^ (%%a ^ ))
4039 exit !errorlevel! )
4140goto :eof
You can’t perform that action at this time.
0 commit comments