:CHEQUEASERVER | |
REM Se fija que sea windows XP, Vista, 7 u 8. | |
REM Si no es, no instala | |
systeminfo | find "Microsoft Windows" > %TEMP%\osname.txt | |
FOR /F "usebackq delims=: tokens=2" %%i IN (%TEMP%\osname.txt) DO set vers=%%i | |
echo %vers% | find "Windows 7" > nul | |
if %ERRORLEVEL% == 0 goto SIGUE | |
echo %vers% | find "Windows Vista" > nul | |
if %ERRORLEVEL% == 0 goto SIGUE | |
echo %vers% | find "Windows XP" > nul | |
if %ERRORLEVEL% == 0 goto SIGUE | |
echo %vers% | find "Windows 8" > nul | |
if %ERRORLEVEL% == 0 goto SIGUE | |
REM Si llego hasta aca abajo, no es | |
REM win xp, vista, 7 ni 8. Por descarte | |
REM es windows server, y no se instala. | |
:FIN |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment