set cur_dir=%~dp0
if exist "%ProgramFiles(x86)%\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvarsall.bat" cd /d "%ProgramFiles(x86)%\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build"
if exist "%ProgramFiles%\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvarsall.bat" cd /d "%ProgramFiles%\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build"
set VSCMD_DEBUG=0
where cl.exe
if %ERRORLEVEL% == 1 call vcvarsall.bat x86
cd /d %cur_dir%
: download perl from http://strawberryperl.com/
: download openssl from https://www.openssl.org/source/
cd /d openssl-1.1.0k
perl Configure VC-WIN32 no-asm --prefix=c:/openssl_lib -static
nmake
nmake install
build.bat
file and run it.