diff --git a/VSgetLibs.bat b/VSgetLibs.bat
deleted file mode 100644
index fefc85c1e4..0000000000
--- a/VSgetLibs.bat
+++ /dev/null
@@ -1,10 +0,0 @@
-@echo OFF
-pushd "%~dp0"
-IF NOT EXIST .\lib\libcurl\ (
- curl http://misozmiric.com/ted/openrct2/orcalibs-vs.zip -o .\lib\orcalibs.zip
- pushd .\lib
- unzip -oaq orcalibs.zip
- del .\orcalibs.zip
- popd
-)
-popd
\ No newline at end of file
diff --git a/pre-build.ps1 b/pre-build.ps1
new file mode 100644
index 0000000000..8dadd76d26
--- /dev/null
+++ b/pre-build.ps1
@@ -0,0 +1,15 @@
+$path = Split-Path $Script:MyInvocation.MyCommand.Path
+$zip = $path+'\lib\orcalibs.zip'
+$libs = $path+'\lib'
+$libcurl = Test-Path $path\lib\libcurl\
+$jansson = Test-Path $path\lib\jansson\
+$sdl = Test-Path $path\lib\sdl\
+if (!$libcurl -or !$jansson -or !$sdl) {
+ Invoke-WebRequest http://misozmiric.com/ted/openrct2/orcalibs-vs.zip -OutFile $path\lib\orcalibs.zip
+ rm $path\lib\libcurl -r -Force -ErrorAction SilentlyContinue
+ rm $path\lib\jansson -r -Force -ErrorAction SilentlyContinue
+ rm $path\lib\sdl -r -Force -ErrorAction SilentlyContinue
+ [System.Reflection.Assembly]::LoadWithPartialName('System.IO.Compression.FileSystem') > $null
+ [System.IO.Compression.ZipFile]::ExtractToDirectory($zip, $libs)
+ rm $path\lib\orcalibs.zip -Force -ErrorAction SilentlyContinue
+}
diff --git a/projects/libs/libs.vcxproj b/projects/libs/libs.vcxproj
index 78a6c82be8..61f4192ac0 100644
--- a/projects/libs/libs.vcxproj
+++ b/projects/libs/libs.vcxproj
@@ -70,7 +70,7 @@
true
true
_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;HAVE_CONFIG_H;_USE_MATH_DEFINES;NS_ENABLE_THREADS;NS_ENABLE_SSL;DISABLE_MD5;%(PreprocessorDefinitions)
- MultiThreadedDLL
+ MultiThreaded
1Byte
@@ -84,8 +84,7 @@
libcurl.lib;Ws2_32.lib;%(AdditionalDependencies)
-
-
+ Powershell -NonInteractive -ExecutionPolicy "ByPass" -File "$(ProjectDir)../../pre-build.ps1"
diff --git a/projects/openrct2.vcxproj b/projects/openrct2.vcxproj
index 80ede23ea6..cc5a145480 100644
--- a/projects/openrct2.vcxproj
+++ b/projects/openrct2.vcxproj
@@ -307,7 +307,7 @@
true
- MultiThreadedDLL
+ MultiThreaded
1Byte
4013