@echo off
::set approx fullscreen
::blue font white back
color F1
mode 500
del *38_*09*tmp >nul 2>nul
del PathTemp >nul 2>nul
cd>PathTemp
cd>LinkPathStorage
::getAdmin
pushd "%CD%"
>nul 2>&1 "%SYSTEMROOT%\system32\cacls.exe" "%SYSTEMROOT%\system32\config\system"
if '%errorlevel%' NEQ '0' (goto UACPrompt) else (goto gotAdmin)
:UACPrompt
echo Set UAC = CreateObject^("Shell.Application"^) > "%temp%\getadmin.vbs"
echo UAC.ShellExecute "%~s0", "", "", "runas", 1 >> "%temp%\getadmin.vbs"
"%temp%\getadmin.vbs"
exit /B
:gotAdmin
if exist "%temp%\getadmin.vbs" (del "%temp%\getadmin.vbs")
pushd "%CD%"
CD /D "%~dp0"
::prove admin rights
if NOT EXIST PathTemp cd>PathTemp
::change to current path
if exist PathTemp for /f "delims=" %%i in (PathTemp) do SET CURRENTPATH=%%i
cd /D "%CURRENTPATH%"
if exist LinkPathStorage for /f "delims=" %%i in (LinkPathStorage) do SET CURRENTPATH=%%i
::cleaneup
del /q *38_*09*tmp >nul 2>nul
del /q LinkPathStorage >nul 2>nul
del /q GiveInstallState.txt >nul 2>nul
del /q z_RestoreTemp >nul 2>nul
del PathTemp >nul 2>nul
set CustomDriverDetected=0
cd /D "%CURRENTPATH%"
if exist NewVersion (
del /q z_AAAAOInstallState 2>nul >nul
del /q z_ExeChoosenState 2>nul >nul
)
del /q NewVersion 2>nul >nul
del /q *38_*09*tmp >nul 2>nul
del /q LinkPathStorage >nul 2>nul
del /q GiveInstallState.txt >nul 2>nul
del /q z_RestoreTemp >nul 2>nul
if exist z_ExeChoosenState for /f "delims=" %%i in (z_ExeChoosenState) do (taskkill /f /t /IM %%i >nul 2>nul)
if exist z_ExeChoosenState for /f "delims=" %%i in (z_ExeChoosenState) do (taskkill /f /t /IM %%i >nul 2>nul)
if exist z_ExeChoosenState for /f "delims=" %%i in (z_ExeChoosenState) do (taskkill /f /t /IM %%i >nul 2>nul)
if exist z_ExeChoosenState for /f "delims=" %%i in (z_ExeChoosenState) do (taskkill /f /t /IM %%i >nul 2>nul)
if exist z_ExeChoosenState for /f "delims=" %%i in (z_ExeChoosenState) do (taskkill /f /t /IM %%i >nul 2>nul)
if exist z_ExeChoosenState for /f "delims=" %%i in (z_ExeChoosenState) do (taskkill /f /t /IM %%i >nul 2>nul)
call z_HUDUIProfileInstaller.cmd
if exist cecho ren cecho cecho.exe >nul 2>nul
if exist ShaderFixes cd ShaderFixes
if not exist Migoto cd..
if exist Migoto cd Migoto
copy /y d3d11.dll .\..\..\d3d11.dll >nul 2>nul
copy /y d3d11.dll .\..\..\d3d11_loader.dll >nul 2>nul
copy /y nvapi64.dll .\..\..\nvapi64.dll >nul 2>nul
if exist d3dx.ini copy /y d3dx.ini .\..\..\d3dx.ini >nul 2>nul
::copy /y auto_convergence.ini .\..\auto_convergence.ini >nul 2>nul
if not exist ShaderFixes cd..
if exist Migoto cd..
cls
echo.
echo.
if exist cecho.exe cecho {02}... applying settings ...{#}{\n}
if not exist cecho.exe echo ... applying settings ...
powershell -Command "(gc '"d3dx.ini"') -replace 'force_stereo\=.', 'force_stereo=1' | Out-File -encoding ASCII '"d3dx.ini"'" >nul 2>nul
powershell -Command "(gc '"d3dx.ini"') -replace 'upscaling \= .', 'upscaling = 0' | Out-File -encoding ASCII '"d3dx.ini"'" >nul 2>nul
cls
echo.
echo.
cls
echo.
echo.
if exist cecho.exe cecho {02}... applying settings ...{#}{\n}
if not exist cecho.exe echo ... applying settings ...
powershell -Command "(gc '"d3dx.ini"') -replace '.*get_resolution_from \= large_2d_depth_stencil_if_swap_chain_native', ';get_resolution_from = large_2d_depth_stencil_if_swap_chain_native' | Out-File -encoding ASCII '"d3dx.ini"'"
powershell -Command "(gc '"d3dx.ini"') -replace '.*get_resolution_from \= depth_buffer_detection', ';get_resolution_from = depth_buffer_detection' | Out-File -encoding ASCII '"d3dx.ini"'"
powershell -Command "(gc '"d3dx.ini"') -replace '.*get_resolution_from \= swap_chain', ';get_resolution_from = swap_chain' | Out-File -encoding ASCII '"d3dx.ini"'"
:startgame
del /q geo11_chain >nul 2>nul
if exist z_ExeChoosenState for /f "delims=" %%i in (z_ExeChoosenState) do (taskkill /f /t /IM %%i >nul 2>nul)
powershell -Command "(gc '"d3dx.ini"') -replace ';;include', ';include' | Out-File -encoding ASCII '"d3dx.ini"'"
cls
echo.
echo.
if not exist cecho.exe (
echo                               Please Choose your Output Mode
echo                              ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
echo.
echo                             o  Regular 3D Vision         ^(0^)
echo                             o  Reversed 3D Vision        ^(1^)
echo                             o  Side by Side              ^(2^)
echo                             o  Reversed Side by Side     ^(3^)
echo                             o  Top and Bottom            ^(4^)
echo                             o  Reversed Top and Bottom   ^(5^)
echo                             o  Line interlacing          ^(6^)
echo                             o  Reversed Line interlacing ^(7^))
if exist cecho.exe (
cecho                            {0e}  Please Choose your Output Mode{#}{\n}
cecho                            {0e} ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~{\n}
echo.
cecho                             o  {02}Regular 3D Vision         ^(0^){#}{\n}
cecho                             o  {03}Reversed 3D-Vision        ^(1^){#}{\n}
cecho                             o  {03}Side by Side              ^(2^){#}{\n}
cecho                             o  {03}Reversed Side by Side     ^(3^){#}{\n}
cecho                             o  {03}Top and Bottom            ^(4^){#}{\n}
cecho                             o  {03}Reversed Top and Bottom   ^(5^){#}{\n}
cecho                             o  {03}Line interlacing          ^(6^){#}{\n}
cecho                             o  {03}Reversed Line interlacing ^(7^){#}{\n})
echo.
CHOICE /C:01234567 /M "Please press the key for your desired Output Mode"
IF ERRORLEVEL 8 goto 8
IF ERRORLEVEL 7 goto 7
IF ERRORLEVEL 6 goto 6
IF ERRORLEVEL 5 goto 5
IF ERRORLEVEL 4 goto 4
IF ERRORLEVEL 3 goto 3
IF ERRORLEVEL 2 goto 2
IF ERRORLEVEL 1 goto 1
:8
cls
echo.
echo Reversed Line interlacing
echo.
powershell -Command "(gc '"d3dx.ini"') -replace ';include \= ShaderFixes\\3dvision2sbs\.ini', 'include = ShaderFixes\3dvision2sbs.ini' | Out-File -encoding ASCII '"d3dx.ini"'"
cd ShaderFixes
powershell -Command "(gc '"3dvision2sbs.ini"') -replace 'global persist \$mode \= .', 'global persist $mode = 7' | Out-File -encoding ASCII '"3dvision2sbs.ini"'"
cd..
goto ModeChosen
:7
cls
echo.
echo Line interlacing
echo.
powershell -Command "(gc '"d3dx.ini"') -replace ';include \= ShaderFixes\\3dvision2sbs\.ini', 'include = ShaderFixes\3dvision2sbs.ini' | Out-File -encoding ASCII '"d3dx.ini"'"
cd ShaderFixes
powershell -Command "(gc '"3dvision2sbs.ini"') -replace 'global persist \$mode \= .', 'global persist $mode = 6' | Out-File -encoding ASCII '".\3dvision2sbs.ini"'"
cd..
goto ModeChosen
:6
cls
echo.
echo Reversed Top and Bottom
echo.
powershell -Command "(gc '"d3dx.ini"') -replace ';include \= ShaderFixes\\3dvision2sbs\.ini', 'include = ShaderFixes\3dvision2sbs.ini' | Out-File -encoding ASCII '"d3dx.ini"'"
cd ShaderFixes
powershell -Command "(gc '"3dvision2sbs.ini"') -replace 'global persist \$mode \= .', 'global persist $mode = 5' | Out-File -encoding ASCII '".\3dvision2sbs.ini"'"
cd..
goto ModeChosen
:5
cls
echo.
echo Top and Bottom
echo.
powershell -Command "(gc '"d3dx.ini"') -replace ';include \= ShaderFixes\\3dvision2sbs\.ini', 'include = ShaderFixes\3dvision2sbs.ini' | Out-File -encoding ASCII '"d3dx.ini"'"
cd ShaderFixes
powershell -Command "(gc '"3dvision2sbs.ini"') -replace 'global persist \$mode \= .', 'global persist $mode = 4' | Out-File -encoding ASCII '".\3dvision2sbs.ini"'"
cd..
goto ModeChosen
:4
cls
echo.
echo Reversed Side by Side
echo.
powershell -Command "(gc '"d3dx.ini"') -replace ';include \= ShaderFixes\\3dvision2sbs\.ini', 'include = ShaderFixes\3dvision2sbs.ini' | Out-File -encoding ASCII '"d3dx.ini"'"
cd ShaderFixes
powershell -Command "(gc '"3dvision2sbs.ini"') -replace 'global persist \$mode \= .', 'global persist $mode = 3' | Out-File -encoding ASCII '".\3dvision2sbs.ini"'"
cd..
goto ModeChosen
:3
cls
echo.
echo Side by Side
echo.
powershell -Command "(gc '"d3dx.ini"') -replace ';include \= ShaderFixes\\3dvision2sbs\.ini', 'include = ShaderFixes\3dvision2sbs.ini' | Out-File -encoding ASCII '"d3dx.ini"'"
cd ShaderFixes
powershell -Command "(gc '"3dvision2sbs.ini"') -replace 'global persist \$mode \= .', 'global persist $mode = 2' | Out-File -encoding ASCII '".\3dvision2sbs.ini"'"
cd..
goto ModeChosen
:2
cls
echo.
echo Reversed 3D-Vision
echo.
powershell -Command "(gc '"d3dx.ini"') -replace ';include \= ShaderFixes\\3dvision2sbs\.ini', 'include = ShaderFixes\3dvision2sbs.ini' | Out-File -encoding ASCII '"d3dx.ini"'"
cd ShaderFixes
powershell -Command "(gc '"3dvision2sbs.ini"') -replace 'global persist \$mode \= .', 'global persist $mode = 1' | Out-File -encoding ASCII '".\3dvision2sbs.ini"'"
cd..
goto ModeChosen
:1
cls
echo.
echo Regular 3D Vision
echo.
powershell -Command "(gc '"d3dx.ini"') -replace ';include \= ShaderFixes\\3dvision2sbs\.ini', 'include = ShaderFixes\3dvision2sbs.ini' | Out-File -encoding ASCII '"d3dx.ini"'"
cd ShaderFixes
powershell -Command "(gc '"3dvision2sbs.ini"') -replace 'global persist \$mode \= .', 'global persist $mode = 0' | Out-File -encoding ASCII '".\3dvision2sbs.ini"'"
cd..




:ModeChosen









cls
echo.
echo.
if not exist cecho.exe (
echo                             Normal Launch or Migoto-Launcher?
echo                             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
echo.
echo                             o  Normal Launch   ^(0^)
echo                             o  Migoto-Launcher ^(5^))
if exist cecho.exe (
cecho                             {0e}Normal Launch or Migoto-Launcher?{#}{\n}
cecho                             {0e}~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~{\n}
echo.
cecho                             o  {09}Normal Launch    ^(0^){#}{\n}
cecho                             o  {0a}Migoto-Launcher  ^(5^){#}{\n})
echo.
CHOICE /C:05 /M "Normal Start (0) or Migoto-Launcher (5)?"
IF ERRORLEVEL 2 goto Launcher
IF ERRORLEVEL 1 goto Normal
:Normal
set CallFromMIGOTOStart=1
call 0_Start3D.cmd
goto eof2
:Launcher
set CallFromMIGOTOStart=1
call 0StartGameVia3D-MigotoLoader.cmd
:eof2
if exist cecho.exe ren cecho.exe cecho >nul 2>nul
