diff --git a/appveyor.yml b/appveyor.yml
index e2888b4b18f413c2c6faf3ed0c2b1747feca6548..683315f56ccac43b5e93f1c3491deae73283a524 100644
--- a/appveyor.yml
+++ b/appveyor.yml
@@ -6,12 +6,13 @@ image:
 
 environment:
   matrix:
-    - QTDIR: C:\Qt\5.12\mingw73_32
+    - QTDIR: C:\Qt\5.12.4\mingw73_32
       CMAKE_GENERATOR: MinGW Makefiles
       MINGW_PATH: C:\Qt\Tools\mingw730_32
 
-    - QTDIR: C:\Qt\5.12\msvc2017_64
-      CMAKE_GENERATOR: Visual Studio 15 2017 Win64
+    - QTDIR: C:\Qt\5.12.4\msvc2017_64
+      CMAKE_GENERATOR: Visual Studio 15 2017
+      CMAKE_GENERATOR_ARCH: x64
       CMD_VCVARS: 'C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvars64.bat'
       BUILD_SUB_DIR: Debug
 
diff --git a/utils/appveyor/after_build.bat b/utils/appveyor/after_build.bat
index 83d6fdc5e87d9ab9bc2b5898c4d015b7c8b925e1..eb49df639386ac4cee7890cf206ed9c14192f661 100644
--- a/utils/appveyor/after_build.bat
+++ b/utils/appveyor/after_build.bat
@@ -36,7 +36,7 @@ xcopy /F "%BuildPlugins%\*.dll" "%Destination%\plugins" || goto :error
 choco install -y InnoSetup || goto :error
 "C:\ProgramData\chocolatey\bin\ISCC.exe" "/O%APPVEYOR_BUILD_FOLDER%" "/DAppVersion=%AppVersion%" "/DRoot=%Destination%" "/DSource=%Source%" "%Source%\Shared\copyq.iss" || goto :error
 
-set QT_LOGGING_TO_CONSOLE=1
+set QT_FORCE_STDERR_LOGGING=1
 "%Executable%" --help || goto :error
 "%Executable%" --version || goto :error
 "%Executable%" --info || goto :error
diff --git a/utils/appveyor/before_build.bat b/utils/appveyor/before_build.bat
index c7703ba0dd93718fdb5eb19a7ea37982625c1bfe..9d6370e7b3766cb3eacbbb95ad48afabed3b3869 100644
--- a/utils/appveyor/before_build.bat
+++ b/utils/appveyor/before_build.bat
@@ -1,3 +1,3 @@
 @echo on
 
-cmake -H. -Bbuild -DCMAKE_BUILD_TYPE=RelWithDebInfo -G "%CMAKE_GENERATOR%" -DWITH_TESTS=ON
+cmake -H. -Bbuild -DWITH_TESTS=ON -DCMAKE_BUILD_TYPE=RelWithDebInfo -G "%CMAKE_GENERATOR%" -A "%CMAKE_GENERATOR_ARCH%"
diff --git a/utils/appveyor/install.bat b/utils/appveyor/install.bat
index 039b5f0ab8c57d0a2a5c8856b21d111761748e65..43b6fa6526ab17d622f37c8692ad484f5e4b1162 100644
--- a/utils/appveyor/install.bat
+++ b/utils/appveyor/install.bat
@@ -3,7 +3,13 @@
 set PATH=%QTDIR%\bin;%PATH%
 set CMAKE_PREFIX_PATH=%QTDIR%\lib\cmake
 
+dir %QTDIR%\bin || goto :error
+dir %QTDIR%\lib\cmake || goto :error
+
 REM Note: Following removes sh.exe from PATH so that CMake can generate MinGW Makefile.
 if DEFINED MINGW_PATH set PATH=%MINGW_PATH%\bin;%PATH:C:\Program Files\Git\usr\bin;=%
 
 if DEFINED CMD_VCVARSALL call %CMD_VCVARSALL%
+
+:error
+exit /b %errorlevel%