Skip to content

Commit

Permalink
Update initialize_environment.bat
Browse files Browse the repository at this point in the history
  • Loading branch information
vocatus authored Jun 2, 2021
1 parent cdaf853 commit 649aa87
Showing 1 changed file with 13 additions and 12 deletions.
25 changes: 13 additions & 12 deletions resources/functions/initialize_environment.bat
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
@echo off

:: Tron Project version and date. These two variables determine the overall project version and date
set TRON_VERSION=11.1.6
set TRON_DATE=2020-01-15
set TRON_VERSION=11.2.1
set TRON_DATE=2021-06-02

:: Set window title
title Tron v%TRON_VERSION% (%TRON_DATE%)
Expand Down Expand Up @@ -82,6 +82,13 @@ if /i %ERRORLEVEL%==0 (
goto detect_network_connection
)

:: Italian
reg query "hklm\system\controlset001\control\nls\language" /v Installlanguage | %FIND% /i "0410" >nul 2>&1
if /i %ERRORLEVEL%==0 (
set SYSTEM_LANGUAGE=it
goto detect_network_connection
)

:: French
reg query "hklm\system\controlset001\control\nls\language" /v Installlanguage | %FIND% /i "040C" >nul 2>&1
if /i %ERRORLEVEL%==0 (
Expand All @@ -103,13 +110,6 @@ if /i %ERRORLEVEL%==0 (
goto detect_network_connection
)

:: Italian
reg query "hklm\system\controlset001\control\nls\language" /v Installlanguage | %FIND% /i "0410" >nul 2>&1
if /i %ERRORLEVEL%==0 (
set SYSTEM_LANGUAGE=it
goto detect_network_connection
)

:: Detect network connection. We assume it's available unless we actively detect it isn't
:detect_network_connection
set NETWORK_AVAILABLE=yes
Expand All @@ -122,15 +122,16 @@ if /i not %ERRORLEVEL%==0 set NETWORK_AVAILABLE=no
:: German
if %SYSTEM_LANGUAGE%==de %WinDir%\system32\ipconfig /all | %FIND% /i "Subnetzmaske" >NUL 2>&1
if /i not %ERRORLEVEL%==0 set NETWORK_AVAILABLE=no
:: Italian
if %SYSTEM_LANGUAGE%==it %WinDir%\system32\ipconfig /all | %FIND% /i "Subnet Mask" >NUL 2>&1
if /i not %ERRORLEVEL%==0 set NETWORK_AVAILABLE=no
:: French
if %SYSTEM_LANGUAGE%==fr %WinDir%\system32\ipconfig /all | %FIND% /i "Masque de" >NUL 2>&1
if /i not %ERRORLEVEL%==0 set NETWORK_AVAILABLE=no
:: Spanish
if %SYSTEM_LANGUAGE%==es %WinDir%\system32\ipconfig /all | %FIND% /i "de subred" >NUL 2>&1
if /i not %ERRORLEVEL%==0 set NETWORK_AVAILABLE=no
:: Italian
if %SYSTEM_LANGUAGE%==it %WinDir%\system32\ipconfig /all | %FIND% /i "Subnet Mask" >NUL 2>&1
if /i not %ERRORLEVEL%==0 set NETWORK_AVAILABLE=no


:: Build USERPROFILES variable which works across ALL versions of Windows for determining location of C:\Users or C:\Documents and Settings
pushd "%USERPROFILE%\.."
Expand Down

0 comments on commit 649aa87

Please sign in to comment.