Steve, I have a question for yah relating to your tools, namely RMpartUSB and my multi-boot drive using your wonderful E2B (This post seems the most logical of the ones you seem to be watching to post it in, sorry in advance if I got it wrong).
So I have gotten a new drive and in the process of copying my stuff over to the new drive I see you updated E2B and I decided to update my toolsets, and making use of your new features and the fact I had driver packs become not accessible due to the new fancy partition mapping you do to support uefi, I have finished working up a work around but have one last snafu that Google isn't helping with and I believe you are the author of the program with the snafu.
For better or worse I have edited your 'RestoreE2B (run as admin).cmd' into 'RestoreE2Bscript.cmd' having changed 1 or 2 lines and deleting 4 to 5 lines, code as follows
@ECHO Off cls SETLOCAL ENABLEEXTENSIONS color 1f echo. pushd "%~dp0" if exist "%systemdrive%\Program Files\RMPrepusb\RMPartusb.exe" pushd "%systemdrive%\Program Files\RMPrepusb" if exist "%systemdrive%\Program Files (x86)\RMPrepusb\RMPartusb.exe" pushd "%systemdrive%\Program Files (x86)\RMPrepusb" if not exist RMPARTUSB.exe echo Please install RMPrepUSB to the standard Program Files location & echo OR copy RMPartUSB.exe to %~dp0! & pause & goto :end echo %~n0 [SSi] v1.00 echo. echo SELECT A USB DRIVE echo ================== echo. rmpartusb% LIST | find "DRIVE" echo. set DD= set /a DD=1 if "%DD%"=="" goto :end if "%DD%"=="0" goto :end set LBA=30 set MBR= set PTN= call :getsec if "%MBR%%PTN%"=="11" goto :gotsec set LBA=60 set MBR= set PTN= call :getsec if "%MBR%%PTN%"=="11" goto :gotsec set LBA=1 set MBR= set PTN= call :getsec if "%MBR%%PTN%"=="11" goto :gotsec echo No backup MBR found! & pause & goto :end :gotsec RMPARTUSB drive^=%DD% usbinfo usbstart^=%LBA% LENGTH=1SEC sure echo Found backup MBR at SECTOR %LBA% echo. :: MUST NOT USE USB drive to store .TMP file as RMPartUSB cannot access it after dismounting the volume! :: Save LBA 0 to E2B0.TMP RMPARTUSB USBTOFILE drive=%DD% FILE="%TEMP%\E2B0.TMP" USBSTART=0 LENGTH=1SEC FILESTART=0 SURE > nul RMPARTUSB USBTOFILE drive=%DD% FILE="%TEMP%\E2B%LBA%.TMP" USBSTART=%LBA% LENGTH=1SEC FILESTART=0 SURE > nul if errorlevel 1 goto :end RMPARTUSB FILETOUSB drive=%DD% FILE="%TEMP%\E2B%LBA%.TMP" USBSTART=0 LENGTH=1SEC FILESTART=0 > nul if errorlevel 1 goto :end echo MBR Restored OK pause :end popd endlocal GOTO :EOF :getsec FOR /F "tokens=16,17 delims=- " %%A IN ('RMPARTUSB drive^=%DD% usbinfo usbstart^=%LBA% length=1sec sure`^| FIND "01F0"') DO ( if "*%%A*%%B*"=="*55*AA*" echo Found MBR & set MBR=1 ) FOR /F "tokens=4 delims=- " %%A IN ('RMPARTUSB drive^=%DD% usbinfo usbstart^=%LBA% length=1sec sure`^| FIND "01C0"') DO ( if not "*%%A*"=="00" echo Found Partition 1 Entry & set PTN=1 ) goto :eof :check_Permissions >nul 2>&1 "%SYSTEMROOT%\system32\cacls.exe" "%SYSTEMROOT%\system32\config\system" REM --> If error flag set, we do not have admin. if '%errorlevel%' NEQ '0' ( echo. echo Sorry - you need to run this script as Administrator. echo. echo Please use right-click - Run as administrator. echo. echo. color cf pause Set ADMIN=FAIL ) else ( echo Administrative permissions confirmed. )
The idea being to use it as part of a startup script on auto pilot. almost all prompts have either been removed or hard coded save one that is a dialogue box courtesy of RMpartusb. is there a way to prevent or auto acknowledge that dialogue box with no user interaction?
PS: this is intended for use in modified pe3 where by default you are already administrator, the idea being as before this script is run the main drive where I keep my driver packs is inaccessible and they are scripted into the start up of said pe3. So what I am doing is running this do get drive access back, running imdisk to remount the image elsewhere and then with the drive once again accessible the drivers go ahead and load.