Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @echo off
- :: BatchGotAdmin
- :-------------------------------------
- :AdminCheck
- 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 Requesting administrative privileges...
- 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 %CD%
- systeminfo | find "System Locale" > locale
- set /p locale= < locale
- del locale
- IF "%locale%"=="System Locale: ja;Japanese" (
- goto ARCH Check
- ) ELSE (
- goto locale abort
- )
- :ARCH Check
- set extension=bkp
- set AMD64=%ProgramFiles(x86)%\MoeNovel\IF MY HEART HAD WINGS\
- set x86=%ProgramFiles%\MoeNovel\IF MY HEART HAD WINGS\
- IF "%PROCESSOR_ARCHITECTURE%"=="AMD64" (
- goto 64-bit Re-Install Check
- ) ELSE (
- goto 32-bit Re-Install Check
- )
- :64-bit Re-Install Check
- IF EXIST "%AMD64%"*."%extension%" (
- goto Re-Install Abort
- ) ELSE (
- echo "Running 64-bit Install"
- xcopy .\* "%AMD64%"
- cd "%AMD64%"
- goto Install
- )
- :32-bit Re-Install Check
- IF EXIST "%x86%"*."%extension%" (
- goto Re-Install Abort
- ) ELSE (
- echo "Running 32-bit Install"
- xcopy .\* "%x86%"
- cd "%x86%"
- 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
- :admin abort
- msg * Running in System32 Directory Aborting
- exit
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement