Merge pull request #169 from FadeMind/master

BATCH files for Windows: PY Runtime availability check
This commit is contained in:
Steven Black
2016-09-03 16:57:55 -04:00
committed by GitHub
2 changed files with 43 additions and 1 deletions
+20
View File
@@ -1,4 +1,24 @@
@ECHO OFF
if not exist "%WINDIR%\py.exe" (
ECHO :: ERROR :: Python 3.5 Runtime NOT FOUND...
ECHO :: ERROR :: Download and install lastest Python 3.5 for Windows from https://www.python.org/downloads/
ECHO :: ERROR :: Exit...
GOTO END
) ELSE (
GOTO PY35RT
)
:PY35RT
if not exist "%PROGRAMFILES%\python35\Python35.dll" (
ECHO :: ERROR :: Python 3.5 Runtime NOT FOUND...
ECHO :: ERROR :: Download and install lastest Python 3.5 for Windows from https://www.python.org/downloads/
ECHO :: ERROR :: Exit...
GOTO END
) ELSE (
ECHO :: INFO :: Python 3.5 Runtime was found!
ECHO :: INFO :: Running main script...
GOTO :UPDATES
)
:UPDATES
::These create various alternate hosts files by combining and adding the gambling, porn, and social media extensions.
updateHostsFile.py -a -o alternates\gambling -e gambling
+23 -1
View File
@@ -3,12 +3,34 @@
:: Next DNS Cache will be refreshed.
:: YOU NEED RUNNING THIS BAT FILE IN COMMAND LINE PROMPT WITH ADMINISTRATOR PRIVILIGES
@ECHO OFF
if not exist "%WINDIR%\py.exe" (
ECHO :: ERROR :: Python 3.5 Runtime NOT FOUND...
ECHO :: ERROR :: Download and install lastest Python 3.5 for Windows from https://www.python.org/downloads/
ECHO :: ERROR :: Exit...
GOTO END
) ELSE (
GOTO PY35RT
)
:PY35RT
if not exist "%PROGRAMFILES%\python35\Python35.dll" (
ECHO :: ERROR :: Python 3.5 Runtime NOT FOUND...
ECHO :: ERROR :: Download and install lastest Python 3.5 for Windows from https://www.python.org/downloads/
ECHO :: ERROR :: Exit...
GOTO END
) ELSE (
ECHO :: INFO :: Python 3.5 Runtime was found...
ECHO :: INFO :: Running main script...
GOTO DNSCHECK
)
:DNSCHECK
if not exist "%WINDIR%\System32\drivers\etc\hosts.skel" (
COPY %WINDIR%\System32\drivers\etc\hosts %WINDIR%\System32\drivers\etc\hosts.skel
GOTO :CLEARDNS
)
:CLEARDNS
updateHostsFile.py -a
COPY hosts %WINDIR%\System32\drivers\etc\
ipconfig /flushdns
GOTO END
:END
:END