salt/pkg/windows/clean_env.bat

36 lines
1.2 KiB
Batchfile
Raw Normal View History

2016-08-09 19:53:55 +00:00
@echo off
@echo Salt Windows Clean Script
2016-08-09 20:11:45 +00:00
@echo ---------------------------------------------------------------------
2016-08-09 19:53:55 +00:00
@echo.
:: Make sure the script is run as Admin
@ echo Administrative permissions required. Detecting permissions...
2016-08-09 20:11:45 +00:00
@echo ---------------------------------------------------------------------
2016-08-09 19:53:55 +00:00
net session >nul 2>&1
if %errorLevel%==0 (
echo Success: Administrative permissions confirmed.
) else (
echo Failure: This script must be run as Administrator
goto eof
)
2016-08-09 20:11:45 +00:00
@echo.
2016-08-09 19:53:55 +00:00
:: Uninstall Python 2.7.12 64bit
2016-08-09 20:11:45 +00:00
@echo %0 :: Uninstalling Python 2.7.12 ...
@echo ---------------------------------------------------------------------
2016-08-09 19:53:55 +00:00
MsiExec.exe /X {9DA28CE5-0AA5-429E-86D8-686ED898C666} /QN
2016-08-09 20:11:45 +00:00
@echo.
2016-08-09 19:53:55 +00:00
:: wipe the Python directory
2016-08-09 20:11:45 +00:00
@echo %0 :: Removing the C:\Python27 Directory ...
@echo ---------------------------------------------------------------------
2016-08-09 19:53:55 +00:00
if exist C:\Python27 (
rd /s /q c:\Python27 || echo Failure: c:\Python27 still exists, please find out why and repeat.
)
2016-08-09 20:11:45 +00:00
@echo.
2016-08-09 19:53:55 +00:00
2016-08-09 20:11:45 +00:00
@echo.
@echo =====================================================================
@echo End of %0
@echo =====================================================================