diff --git a/Makefile b/Makefile
index 1afc1b3349786a1fa65c6869594762b29e7dea1a..8e085d0b20bf17fc1cc761b6b3fe54111667fa93 100644
--- a/Makefile
+++ b/Makefile
@@ -212,7 +212,7 @@ endif
 	@cp -r "${QTBUILD}/release/${TARGET}.app"/ ${INST_DATA}/
 endif
 ifeq (${PLATFORM}, windows)
-	@wget ${OPENVPN_WINDOWS_INSTALLER} -O ${INST_DATA}/openvpn-installer.msi
+	@wget.exe ${OPENVPN_WINDOWS_INSTALLER} -O ${INST_DATA}/openvpn-installer.msi
 	@VERSION=${VERSION} VENDOR_PATH=${VENDOR_PATH} ${SCRIPTS}/gen-qtinstaller windows ${INSTALLER}
 ifeq (${VENDOR_PATH}, providers)
 	@cp ${VENDOR_PATH}/${PROVIDER}/assets/icon.ico ${INST_DATA}/icon.ico
@@ -221,15 +221,15 @@ else
 endif
 	@cp ${QTBUILD}/release/${TARGET}.exe ${INST_DATA}${TARGET}.exe
 ifeq (${RELEASE}, yes)
-	@windeployqt --release --qmldir gui/components ${INST_DATA}${TARGET}.exe
+	@windeployqt --qmldir gui/components ${INST_DATA}${TARGET}.exe
 else
 	@windeployqt --qmldir gui/components ${INST_DATA}${TARGET}.exe
 endif
 	# XXX this is a workaround for missing libs after windeployqt ---
-	@cp $(shell cygpath $(${QMAKE} -query 'QT_INSTALL_BINS'))/bin/libgcc_s_seh-1.dll ${INST_DATA}
-	@cp $(shell cygpath $(${QMAKE} -query 'QT_INSTALL_BINS'))/bin/libstdc++-6.dll ${INST_DATA}
-	@cp $(shell cygpath $(${QMAKE} -query 'QT_INSTALL_BINS'))/bin/libwinpthread-1.dll ${INST_DATA}
-	@cp -r $(shell cygpath $(${QMAKE} -query 'QT_INSTALL_QML'))/qml ${INST_DATA}
+	@cp $(shell cygpath $(shell ${QMAKE} -query 'QT_INSTALL_BINS'))/libgcc_s_seh-1.dll ${INST_DATA}
+	@cp $(shell cygpath $(shell ${QMAKE} -query 'QT_INSTALL_BINS'))/libstdc++-6.dll ${INST_DATA}
+	@cp $(shell cygpath $(shell ${QMAKE} -query 'QT_INSTALL_BINS'))/libwinpthread-1.dll ${INST_DATA}
+	@cp -r $(shell cygpath $(shell ${QMAKE} -query 'QT_INSTALL_QML')) ${INST_DATA}
 endif
 ifeq (${PLATFORM}, linux)
 	@VERSION=${VERSION} ${SCRIPTS}/gen-qtinstaller linux ${INSTALLER}
@@ -346,9 +346,9 @@ gen_providers_json:
 	@VENDOR_PATH=${VENDOR_PATH} branding/scripts/gen-providers-json gui/providers/providers.json
 
 prepare_templates: generate tgz
-	@mkdir -p build/${PROVIDER}/bin/ deploy
-	@cp ${TEMPLATES}/makefile/Makefile build/${PROVIDER}/Makefile
-	@VERSION=${VERSION} VENDOR_PATH=${VENDOR_PATH} ${SCRIPTS}/generate-vendor-make build/${PROVIDER}/vendor.mk
+	mkdir -p build/${PROVIDER}/bin/ deploy
+	cp ${TEMPLATES}/makefile/Makefile build/${PROVIDER}/Makefile
+	VERSION=${VERSION} VENDOR_PATH=${VENDOR_PATH} ${SCRIPTS}/generate-vendor-make build/${PROVIDER}/vendor.mk
 
 generate:
 	@go generate gui/backend.go
@@ -359,7 +359,7 @@ TGZ_PATH = ./build/${TGZ_NAME}
 tgz:
 	@mkdir -p $(TGZ_PATH)
 	git archive HEAD | tar -x -C $(TGZ_PATH)
-	@cd build/ && tar czf bitmask-vpn_$(VERSION).tgz ${TGZ_NAME}
+	@pushd build/ && tar czf bitmask-vpn_$(VERSION).tgz ${TGZ_NAME} && popd
 	@rm -rf $(TGZ_PATH)
 
 
diff --git a/branding/templates/qtinstaller/packages/bitmaskvpn/meta/install.js b/branding/templates/qtinstaller/packages/bitmaskvpn/meta/install.js
index fcdb61ca6e0814b960e194b5ea974942c78b10d4..aec99030046637bffcaad0b3232722ba1cd25079 100644
--- a/branding/templates/qtinstaller/packages/bitmaskvpn/meta/install.js
+++ b/branding/templates/qtinstaller/packages/bitmaskvpn/meta/install.js
@@ -9,6 +9,14 @@ function majorVersion(str)
     return parseInt(str.split(".", 1));
 }
 
+var Dir = new function () {
+    this.toNativeSeparator = function (path) {
+        if (installer.value("os") == "win")
+            return path.replace(/\//g, '\\');
+        return path;
+    }
+};
+
 function cancelInstaller(message)
 {
     installer.setDefaultPageVisible(QInstaller.Introduction, false);
@@ -100,8 +108,9 @@ function preInstallWindows() {
 
 function postInstallWindows() {
     // TODO - we probably need to package different flavors of the installer for windows 8, arm, i386 etc, and change the installer we ship too.
+    var openvpnMsiPath = Dir.toNativeSeparator(installer.value("TargetDir") + "/openvpn-installer.msi");
     console.log("Installing OpenVPN binaries and service");
-    component.addElevatedOperation("Execute", "{0}", "msiexec", "/i", "@TargetDir@\\openvpn-installer.msi", "ADDLOCAL=OpenVPN.Service,OpenVPN,Drivers,Drivers.TAPWindows6,Drivers.Wintun", "/passive")
+    component.addElevatedOperation("Execute", "{0}", "msiexec.exe", "/i", openvpnMsiPath, "ADDLOCAL=OpenVPN.Service,OpenVPN,Drivers,Drivers.TAPWindows6,Drivers.Wintun", "/passive")
     console.log("Adding shortcut entries...");
     component.addElevatedOperation("Mkdir", "@StartMenuDir@");
     component.addElevatedOperation("CreateShortcut", "@TargetDir@\\$BINNAME.exe", "@StartMenuDir@\\$APPNAME.lnk", "workingDirectory=@TargetDir@", "iconPath=@TargetDir@\\icon.ico", "description=Start $APPNAME");