fix bug in install_wufuc.bat
there was a bug that would cause the installer to crash if it was located in a path that had any parentheses.
This commit is contained in:
@@ -50,7 +50,9 @@ goto :get_ver
|
|||||||
set "WINDOWS_ARCHITECTURE=x64"
|
set "WINDOWS_ARCHITECTURE=x64"
|
||||||
set "wufuc_dll=%~dp0wufuc64.dll"
|
set "wufuc_dll=%~dp0wufuc64.dll"
|
||||||
|
|
||||||
if not exist "%wufuc_dll%" (
|
if exist "%wufuc_dll%" (
|
||||||
|
goto :get_ver
|
||||||
|
)
|
||||||
echo ERROR - Could not find %wufuc_dll%!
|
echo ERROR - Could not find %wufuc_dll%!
|
||||||
echo.
|
echo.
|
||||||
echo This most likely means you tried to clone the repository.
|
echo This most likely means you tried to clone the repository.
|
||||||
@@ -64,7 +66,6 @@ if not exist "%wufuc_dll%" (
|
|||||||
echo This error could also mean that your anti-virus deleted or quarantined wufuc
|
echo This error could also mean that your anti-virus deleted or quarantined wufuc
|
||||||
echo in which case, you will need to make an exception and restore it.
|
echo in which case, you will need to make an exception and restore it.
|
||||||
goto :die
|
goto :die
|
||||||
)
|
|
||||||
|
|
||||||
:get_ver
|
:get_ver
|
||||||
for /f "tokens=*" %%i in ('wmic /output:stdout datafile where "name='%wufuc_dll:\=\\%'" get Version /value ^| find "="') do set "%%i"
|
for /f "tokens=*" %%i in ('wmic /output:stdout datafile where "name='%wufuc_dll:\=\\%'" get Version /value ^| find "="') do set "%%i"
|
||||||
@@ -72,7 +73,9 @@ title wufuc installer - v%Version%
|
|||||||
|
|
||||||
set "wufuc_xml=%~dp0wufuc.xml"
|
set "wufuc_xml=%~dp0wufuc.xml"
|
||||||
|
|
||||||
if not exist "%wufuc_xml%" (
|
if exist "%wufuc_xml%" (
|
||||||
|
goto :check_ver
|
||||||
|
)
|
||||||
echo ERROR - Could not find %wufuc_xml%!
|
echo ERROR - Could not find %wufuc_xml%!
|
||||||
echo.
|
echo.
|
||||||
echo This most likely means you didn't extract all the files from the archive.
|
echo This most likely means you didn't extract all the files from the archive.
|
||||||
@@ -80,7 +83,6 @@ if not exist "%wufuc_xml%" (
|
|||||||
echo Please extract all the files from wufuc_v%Version%.zip to a permanent
|
echo Please extract all the files from wufuc_v%Version%.zip to a permanent
|
||||||
echo location like C:\Program Files\wufuc and try again.
|
echo location like C:\Program Files\wufuc and try again.
|
||||||
goto :die
|
goto :die
|
||||||
)
|
|
||||||
|
|
||||||
:check_ver
|
:check_ver
|
||||||
ver | findstr " 6\.1\." >nul && (
|
ver | findstr " 6\.1\." >nul && (
|
||||||
|
Reference in New Issue
Block a user