Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @echo off
- :: BatchGotAdmin
- :-------------------------------------
- REM --> Check for 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 Aborting
- 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"
- :--------------------------------------
- IF "%CD%"=="C:\Windows\system32" (
- goto admin abort
- ) ELSE (
- goto Locale Check
- )
- :Locale Check
- echo Checking Locale please wait
- systeminfo | find "System Locale" > locale
- set /p locale= < locale
- del locale
- echo System Locale set to "%locale%"
- IF "%locale%"=="System Locale: ja;Japanese" (
- goto ARCH Check
- ) ELSE (
- goto locale abort
- )
- :ARCH Check
- set extension=bkp
- IF "%PROCESSOR_ARCHITECTURE%"=="AMD64" (
- goto 64-bit Install Path
- ) ELSE (
- goto 32-bit Install Path
- )
- :64-bit Install Path
- cls
- echo CaSe SeNsItIvE
- echo Default Installation Path is "C:\Program Files (x86)\MoeNovel\IF MY HEART HAD WINGS\"
- set /p selection="Is IF MY HEART HAD WINGS installed in the default location(Y/N): "
- IF "%selection%"=="Y" (
- set "install=C:\Program Files (x86)\MoeNovel\IF MY HEART HAD WINGS\"
- goto 64-bit Confirm
- ) ELSE IF "%selection%"=="N" (
- cls
- set /p install="Please Input Install Path: "
- goto 64-bit Confirm
- ) ELSE (
- goto ARCH Check
- )
- :64-bit Confirm
- cls
- echo CaSe SeNsItIvE
- set /p confirm="Is this the correct install path "%install%" (Y/N): "
- echo "%confirm%"
- IF "%confirm%"=="Y" (
- goto 64-bit Re-Install Check
- ) ELSE IF "%confirm%"=="N" (
- goto 64-bit Install Path
- ) ELSE (
- goto 64-bit Confirm Retry
- )
- :64-bit Re-Install Check
- IF EXIST "%install%"*."%extension%" (
- goto Re-Install Abort
- ) ELSE (
- echo "Running 64-bit Install"
- xcopy .\* "%install%"
- cd "%install%"
- goto Install
- )
- :32-bit Install Path
- cls
- echo CaSe SeNsItIvE
- echo Default Installation Path is "C:\Program Files\MoeNovel\IF MY HEART HAD WINGS\"
- set /p selection="Is IF MY HEART HAD WINGS installed in the default location(Y/N): "
- IF "%selection%"=="Y" (
- set "install=C:\Program Files\MoeNovel\IF MY HEART HAD WINGS\"
- goto 32-bit Confirm
- ) ELSE IF "%selection%"=="N" (
- cls
- set /p install="Please Input Install Path: "
- goto 32-bit Confirm
- ) ELSE (
- goto ARCH Check
- )
- :32-bit Confirm
- cls
- echo CaSe SeNsItIvE
- set /p confirm="Is this the correct install path "%install%" (Y/N): "
- echo "%confirm%"
- IF "%confirm%"=="Y" (
- goto 32-bit Re-Install Check
- ) ELSE IF "%confirm%"=="N" (
- goto 32-bit Install Path
- ) ELSE (
- goto 32-bit Install Path
- )
- :32-bit Re-Install Check
- IF EXIST "%install%"*."%extension%" (
- goto Re-Install Abort
- ) ELSE (
- echo "Running 64-bit Install"
- xcopy .\* "%install%"
- cd "%install%"
- goto Install
- )
- :Install
- @echo on
- xdelta3.exe -d -s CHIP4.arc Chip4.arc.diff chip4.arc.new
- ren CHIP4.arc CHIP4.arc.bkp
- ren chip4.arc.new CHIP4.arc
- xdelta3.exe -d -s Chip1.arc chip1.arc.diff chip1.arc.new
- ren Chip1.arc Chip1.arc.bkp
- ren chip1.arc.new Chip1.arc
- xdelta3.exe -d -s CHIP2.arc chip2.arc.diff chip2.arc.new
- ren CHIP2.arc CHIP2.arc.bkp
- ren chip2.arc.new CHIP2.arc
- xdelta3.exe -d -s CHIP3.arc Chip3.arc.diff chip3.arc.new
- ren CHIP3.arc CHIP3.arc.bkp
- ren chip3.arc.new CHIP3.arc
- xdelta3.exe -d -s CHIP5.arc Chip5.arc.diff chip5.arc.new
- ren CHIP5.arc CHIP5.arc.bkp
- ren chip5.arc.new CHIP5.arc
- xdelta3.exe -d -s CHIP6.arc Chip6.arc.diff chip6.arc.new
- ren CHIP6.arc CHIP6.arc.bkp
- ren chip6.arc.new CHIP6.arc
- xdelta3.exe -d -s Graphic.arc graphic.arc.diff graphic.arc.new
- ren Graphic.arc Graphic.arc.bkp
- ren graphic.arc.new Graphic.arc
- xdelta3.exe -d -s Voice.arc voice.arc.diff voice.arc.new
- ren Voice.arc Voice.arc.bkp
- ren voice.arc.new Voice.arc
- ren Rio.arc Rio.arc.bkp
- ren Rio.arc.new Rio.arc
- %pause
- exit
- :Re-Install Abort
- msg * You have already installed the Restoration Patch
- exit
- :locale abort
- msg * Set locale to Japanese.
- exit
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement