modmii.github.io/Support/ExploitAppSelector.bat
XFlak 3b96b9c28f 6.6.2 Changelog - 2021:04-06:
*Added multi-language support for analyzing syscheck.csv logs (English, German, French, Spanish & Italian).
*NAND backups are now included in syscheck updater guides when updating the HBC or Bootmii.
*Improvements to syscheck updater guide based on the version of the HBC currently installed:
    -If the HBC/Bootmii needs to be updated, and IOS58 is already installed, updating the HBC is the first step.
    -If the HBC/Bootmii needs to be updated, and IOS58 is not already installed, ModMii will have you update this AFTER the install WADs (or Priiloader) step in order to have the HBC reinstall to use IOS58.
    -If the HBC is super old (older than v1.0.7), updating the HBC is the first step in order to gain ahbprot\no-ios-reload support, then ONLY if IOS58 was not already installed according to the syscheck the HBC is reinstalled after the install Wads (or Priiloader) step in order to have the HBC reinstall to use IOS58. 
*ModMii now detects if it's missing write access to the installation folder, and only if necessary, prompts you to either change the installation directory or press any key to re-launch itself as admin. When relaunching itself, *if the standard ModMii shortcuts are detected, they will also be updated to launch ModMii as admin in the future.
*Added write permissions check for SD and USB directory settings.
*ModMii now works when installed to folders with special characters.
*Updated launchers (ModMii.exe and ModMiiSkin.exe) by person66 to support carets in installation path.
*Fixed bug where advanced download IOS patches were not being applied if the slot number was left unchanged.
*tmdedit.exe is no longer used to build d2x v10beta52 and 53alt cIOSs. One user briefly encountered problems with tmdedit that have not resurfaced, but just in case.
*Fixed bug when saving\loading MAC address for Wilbrand in ModMii Classic's saved wizard settings from a previous session.
*Restored code page to 437 as some users reported slowdowns with unicode (65001). Unicode still used but very sparingly when running the sneek installer (Windows 10 only).
*Updated cygwin1.dll to clear warnings when running ModMii's sneek game extractor or forwarder ISO creator; warnings made no difference on the output of files.
*Added note to Region Change guides on how to update Nintendo channels (e.g. News, Internet, etc.) in case existing channels don't work on the new region.
*Removed the HBC Reinstallation youtube video and gif from guides (redundant).
*Priiloader updated to v0.9.1 and updated hacks_hash for WiimmFi v4.
*Updated the version of Priiloader (and hacks) that get installed to Emulated NANDs to v0.9.1 (from v0.7 neek mod). Also added note when installing Priiloader to an EmuNAND that it is bypassed in neek2o rev 93-96.
*USB Loader GX updated to v3.0 r1272 mod v6.
*WiiFlow Lite updated to v5.4.9.
*Nintendont updated to v6.492.
*ShowMiiWads updated to v1.5 Mod; now includes 64bit version in addition to 32bit.
*If ModMii appears infected you should quarantine for 2 weeks before gaming online.
*Other minor changes.
2021-04-06 23:37:37 +03:00

193 lines
5.1 KiB
Batchfile

@echo off
setlocal
chdir /d "%~dp0"
chcp 437>nul
set DRIVE=
::check if local
if not exist apps goto:skip
set DRIVE=%cd%
if /i "%DRIVE:~-1%" EQU "\" set DRIVE=%DRIVE:~0,-1%
dir "%DRIVE%\apps\*.dol" "%DRIVE%\apps\*.elf" /B /S>%temp%\applist.txt
if not errorlevel 1 goto:gotdrive
set DRIVE=
:skip
if not exist Support cd..
::check for modmii drive setting
if not exist Support\settings.bat goto:skip
::remove setting path's with an & symbol and force default
if exist Support\sfk.exe Support\sfk filter -spat Support\settings.bat -!"\x26" -write -yes>nul
call Support\settings.bat
if "%DRIVE%"=="" (goto:skip)
if /i "%DRIVE:~1,1%" NEQ ":" set DRIVE=%cd%\%DRIVE%
dir "%DRIVE%\apps\*.dol" "%DRIVE%\apps\*.elf" /B /S >%temp%\applist.txt
if not errorlevel 1 (move /y %temp%\applist.txt %temp%\applist.txt>nul) & (goto:gotdrive)
set DRIVE=
:skip
::check for COPY_TO_SD
if not exist COPY_TO_SD\apps goto:skip
set DRIVE=%cd%\COPY_TO_SD
dir "%DRIVE%\apps\*.dol" "%DRIVE%\apps\*.elf" /B /S>%temp%\applist.txt
if not errorlevel 1 goto:gotdrive
set DRIVE=
:skip
:noapps
echo Exploit App Selector
echo by XFlak
echo.
echo This tool will help you quickly switch the boot.dol\elf app that is saved to the root of your SD Card to be launched by Wii Exploits.
echo.
echo *If you're seeing this message something went wrong, make sure this file is saved to the root of your SD Card or COPY_TO_SD folder and that it has an apps folder with some Wii apps in it.
echo.
echo Press any key to exit . . .
pause>nul
exit
:gotdrive
cls
echo Exploit App Selector
echo by XFlak
echo.
echo This tool will help you quickly switch the boot.dol\elf app that is saved to the root of your SD Card to be launched by Wii Exploits.
echo.
echo Confirm this your SD Card or COPY_TO_SD folder: %DRIVE%
echo *If this isn't right, make sure this file is saved to the root of your SD Card or COPY_TO_SD folder and that it has an apps folder with some Wii apps in it.
echo.
echo Select the App to start when an exploit is launched on your Wii:
echo.
::Loop through the the following once for EACH line in *.txt
set /a line=0
for /F "tokens=*" %%A in (%temp%\applist.txt) do call :process %%A
goto:quickskip
:process
set file=%*
::skip any lines ending in bootmini.elf
if /i "%file:~-12%" EQU "bootmini.elf" goto:EOF
set /a line=%line%+1
echo %line% = %file%
goto:EOF
:quickskip
echo.
echo Notes: * Not all exploits support Dols; however, Elf files work with all exploits.
echo * If the app you want to select isn't listed above, save it here and try again:
echo %DRIVE%\apps
echo.
set /p selection= Enter Selection Here:
if /i "%selection%" EQU "exit" exit
::check if numeric
SET "var="&for /f "delims=0123456789" %%i in ("%selection%") do set var=%%i
if defined var goto:badkey
if /i %selection% GTR %line% goto:badkey
::Loop through the the following once for EACH line in *.txt
set /a line=0
for /F "tokens=*" %%A in (%temp%\applist.txt) do call :process %%A
goto:quickskip
:process
set file=%*
::skip any lines ending in bootmini.elf
if /i "%file:~-12%" EQU "bootmini.elf" goto:EOF
set /a line=%line%+1
if /i "%line%" EQU "%selection%" goto:quickskip
goto:EOF
:quickskip
::make backup
if exist "%Drive%\boot.dol" goto:overwriteQ
if not exist "%Drive%\boot.elf" goto:skiprename
:overwriteQ
echo.
echo Boot.dol\elf already detected in %DRIVE%
echo Overwrite\Delete or Rename? O/R
echo.
set /p selection= Enter Selection Here:
if /i "%selection%" EQU "R" goto:skip
if /i "%selection%" NEQ "O" goto:notO
if exist "%Drive%\boot.elf" del "%Drive%\boot.elf">nul
if exist "%Drive%\boot.dol" del "%Drive%\boot.dol">nul
goto:skiprename
:notO
cls
echo You Have Entered an Incorrect Key
@ping 127.0.0.1 -n 2 -w 1000> nul
cls
goto:overwriteQ
:skip
echo.
if not exist "%Drive%\boot.dol" goto:skip
:COPY
SET /a COUNT=%COUNT%+1
if exist "%Drive%\boot%COUNT%.dol" goto:COPY
rename "%Drive%\boot.dol" "boot%COUNT%.dol"
echo Renaming "%Drive%\boot.dol" to "boot%COUNT%.dol"
:skip
if not exist "%Drive%\boot.elf" goto:skiprename
set /a COUNT=0
:COPY2
SET /a COUNT=%COUNT%+1
if exist "%Drive%\boot%COUNT%.elf" goto:COPY2
rename "%Drive%\boot.elf" "boot%COUNT%.elf"
echo Renaming "%Drive%\boot.elf" to "boot%COUNT%.elf"
:skiprename
::get app name
echo set app=%%file:%DRIVE%\apps\=%%>%temp%\app.bat
call %temp%\app.bat
echo.
echo Copying "..\%app%" to "%Drive%\boot.%file:~-3%"...
copy /y "%file%" "%Drive%\boot.%file:~-3%">nul
if errorlevel 1 goto:fail
echo.
echo FINISHED!
echo.
echo Safely remove your SD Card and insert it into your Wii. The next time you launch an exploit it will load a copy of %app%.
echo.
if /i "%file:~-3%" EQU "dol" (echo WARNING: Not all exploits support Dols; however, Elf files work with all exploits.) & (echo.)
echo Press any key to exit . . .
pause>nul
exit
:badkey
echo You Have Entered an Incorrect Key
@ping 127.0.0.1 -n 2 -w 1000> nul
goto:gotdrive
:fail
echo.
echo *If you're seeing this message something went wrong.
echo.
echo Press any key to exit . . .
pause>nul
exit