Skip to content
This repository was archived by the owner on Dec 10, 2018. It is now read-only.

Commit 5423d38

Browse files
committed
Fixed #1
1 parent ff0b95e commit 5423d38

1 file changed

Lines changed: 12 additions & 11 deletions

File tree

decrypt.bat

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -176,12 +176,13 @@ set mm=%date:~5,2%
176176
set yyyy=%date:~0,4%
177177
set time=%date:~11,5%
178178
reg copy "HKCU\Control Panel\International-Temp" "HKCU\Control Panel\International" /f >nul
179+
if not exist %OUT%\nul mkdir %OUT%
179180
bin\cdimage.exe -bootdata:2#p0,e,b"ISOFOLDER\boot\etfsboot.com"#pEF,e,b"ISOFOLDER\efi\Microsoft\boot\efisys.bin" -o -h -m -u2 -udfver102 -t%mm%/%dd%/%yyyy%,%time%:00 -l%DVDLABEL% ISOFOLDER %OUT%\%DVDISO%
180181
SET ERRORTEMP=%ERRORLEVEL%
181182
IF %ERRORTEMP% NEQ 0 (
182-
echo.
183183
echo [Critical] Errors were reported during ISO creation.
184-
pause >nul
184+
goto error
185+
exit /b
185186
)
186187
rmdir /s /q ISOFOLDER\
187188
IF EXIST "%ESD%.bak" (
@@ -194,24 +195,24 @@ pause >nul
194195
exit /b
195196

196197
:Decrypt <ESD> {key}
197-
if not exist "%1.bak" (
198+
if not exist "%~1.bak" (
198199
echo [Info] Backing up original esd file...
199-
copy "%1" "%1.bak" >nul
200+
copy "%~1" "%1.bak" >nul
200201
)
201202
echo [Info] Running Decryption program...
202-
bin\esddecrypt.exe "%1" 2>"%temp%\esddecrypt.log"&&exit /b
203-
bin\esddecrypt.exe "%1" %2 &&exit /b
203+
bin\esddecrypt.exe "%~1" 2>"%temp%\esddecrypt.log"&&exit /b
204+
bin\esddecrypt.exe "%~1" %2 &&exit /b
204205
type "%temp%\esddecrypt.log"
205206
echo [Critical] Errors were reported during ESD decryption.
206207
goto error
207208
exit /b
208209

209210
:PREPARE <ESD>
210-
for /f "tokens=2 delims=: " %%i in ('%wimlib% info "%1" 4 ^| find /i "Architecture"') do set arch=%%i
211-
for /f "tokens=3 delims=: " %%i in ('%wimlib% info "%1" 4 ^| find /i "Edition"') do set editionid=%%i
212-
for /f "tokens=3 delims=: " %%i in ('%wimlib% info "%1" 4 ^| find /i "Default"') do set langid=%%i
213-
for /f "tokens=2 delims=: " %%i in ('%wimlib% info "%1" 4 ^| findstr /b "Build"') do set build=%%i
214-
for /f "tokens=4 delims=: " %%i in ('%wimlib% info "%1" 4 ^| find /i "Service Pack Build"') do set svcbuild=%%i
211+
for /f "tokens=2 delims=: " %%i in ('%wimlib% info "%~1" 4 ^| find /i "Architecture"') do set arch=%%i
212+
for /f "tokens=3 delims=: " %%i in ('%wimlib% info "%~1" 4 ^| find /i "Edition"') do set editionid=%%i
213+
for /f "tokens=3 delims=: " %%i in ('%wimlib% info "%~1" 4 ^| find /i "Default"') do set langid=%%i
214+
for /f "tokens=2 delims=: " %%i in ('%wimlib% info "%~1" 4 ^| findstr /b "Build"') do set build=%%i
215+
for /f "tokens=4 delims=: " %%i in ('%wimlib% info "%~1" 4 ^| find /i "Service Pack Build"') do set svcbuild=%%i
215216

216217
set lang=%langid:~0,2%
217218
if /i %langid%==en-gb set lang=en-gb

0 commit comments

Comments
 (0)