summaryrefslogtreecommitdiff
path: root/src/SMAPI.Installer/assets/install on Windows.bat
diff options
context:
space:
mode:
authorJesse Plamondon-Willard <Pathoschild@users.noreply.github.com>2021-12-05 19:10:39 -0500
committerJesse Plamondon-Willard <Pathoschild@users.noreply.github.com>2021-12-05 19:10:39 -0500
commit8a2618d812e4e2f36161907af5af5c484eb37abf (patch)
treec164325cf57fb43e4375e94dc584fbc3ab3ceeb5 /src/SMAPI.Installer/assets/install on Windows.bat
parent42e878e77d58569be81e34ca206a78e0ebe0604d (diff)
parent5b5dd47c22a1332a4c432d6a1cd414b5c83388d7 (diff)
downloadSMAPI-8a2618d812e4e2f36161907af5af5c484eb37abf.tar.gz
SMAPI-8a2618d812e4e2f36161907af5af5c484eb37abf.tar.bz2
SMAPI-8a2618d812e4e2f36161907af5af5c484eb37abf.zip
Merge branch 'develop' into stable
Diffstat (limited to 'src/SMAPI.Installer/assets/install on Windows.bat')
-rw-r--r--src/SMAPI.Installer/assets/install on Windows.bat41
1 files changed, 41 insertions, 0 deletions
diff --git a/src/SMAPI.Installer/assets/install on Windows.bat b/src/SMAPI.Installer/assets/install on Windows.bat
new file mode 100644
index 00000000..b0d9ae81
--- /dev/null
+++ b/src/SMAPI.Installer/assets/install on Windows.bat
@@ -0,0 +1,41 @@
+@echo off
+setlocal enabledelayedexpansion
+
+SET installerDir="%~dp0"
+
+REM make sure we're not running within a zip folder
+echo %installerDir% | findstr /C:"%TEMP%" 1>nul
+if %ERRORLEVEL% EQU 0 (
+ echo Oops! It looks like you're running the installer from inside a zip file. Make sure you unzip the download first.
+ echo.
+ pause
+ exit
+)
+
+REM make sure an antivirus hasn't deleted the installer DLL
+if not exist %installerDir%"internal\windows\SMAPI.Installer.dll" (
+ echo Oops! SMAPI is missing one of its files. Your antivirus might have deleted it.
+ echo Missing file: %installerDir%internal\windows\SMAPI.Installer.dll
+ echo.
+ pause
+ exit
+)
+if not exist %installerDir%"internal\windows\SMAPI.Installer.exe" (
+ echo Oops! SMAPI is missing one of its files. Your antivirus might have deleted it.
+ echo Missing file: %installerDir%internal\windows\SMAPI.Installer.exe
+ echo.
+ pause
+ exit
+)
+
+REM start installer
+internal\windows\SMAPI.Installer.exe
+
+REM keep window open if it failed
+if %ERRORLEVEL% NEQ 0 (
+ echo.
+ echo Oops! The SMAPI installer seems to have failed. The error details may be shown above.
+ echo.
+ pause
+ exit
+)