|
- :: Load the system values.
- :: void getValues();
- :: /************************************************************************************/
- :getValues
- for /f "tokens=4-5 delims=[] " %%a in ('ver') do set version=%%a%%b
- for %%a in (%version%) do set version=%%a
-
- if %version% EQU 5.1.2600 (
- :: Name: "Microsoft Windows XP"
- set name=Microsoft Windows XP
- :: Family: Windows 5
- set family=5
- :: Compatibility: Yes
- set allow=Yes
- ) else if %version% EQU 5.2.3790 (
- :: Name: "Microsoft Windows XP Professional x64 Edition"
- set name=Microsoft Windows XP Professional x64 Edition
- :: Family: Windows 5
- set family=5
- :: Compatibility: Yes
- set allow=Yes
- ) else if %version% EQU 6.0.6000 (
- :: Name: "Microsoft Windows Vista"
- set name=Microsoft Windows Vista
- :: Family: Windows 6
- set family=6
- :: Compatibility: Yes
- set allow=Yes
- ) else if %version% EQU 6.0.6001 (
- :: Name: "Microsoft Windows Vista SP1"
- set name=Microsoft Windows Vista SP1
- :: Family: Windows 6
- set family=6
- :: Compatibility: Yes
- set allow=Yes
- ) else if %version% EQU 6.0.6002 (
- :: Name: "Microsoft Windows Vista SP2"
- set name=Microsoft Windows Vista SP2
- :: Family: Windows 6
- set family=6
- :: Compatibility: Yes
- set allow=Yes
- ) else if %version% EQU 6.1.7600 (
- :: Name: "Microsoft Windows 7"
- set name=Microsoft Windows 7
- :: Family: Windows 7
- set family=7
- :: Compatibility: Yes
- set allow=Yes
- ) else if %version% EQU 6.1.7601 (
- :: Name: "Microsoft Windows 7 SP1"
- set name=Microsoft Windows 7 SP1
- :: Family: Windows 7
- set family=7
- :: Compatibility: Yes
- set allow=Yes
- ) else if %version% EQU 6.2.9200 (
- :: Name: "Microsoft Windows 8"
- set name=Microsoft Windows 8
- :: Family: Windows 8
- set family=8
- :: Compatibility: Yes
- set allow=Yes
- ) else if %version% EQU 6.3.9200 (
- :: Name: "Microsoft Windows 8.1"
- set name=Microsoft Windows 8.1
- :: Family: Windows 8
- set family=8
- :: Compatibility: Yes
- set allow=Yes
- ) else if %version% EQU 6.3.9600 (
- :: Name: "Microsoft Windows 8.1 Update 1"
- set name=Microsoft Windows 8.1 Update 1
- :: Family: Windows 8
- set family=8
- :: Compatibility: Yes
- set allow=Yes
- ) else (
- ver | find "10.0." > nul
- if %errorlevel% EQU 0 (
- :: Name: "Microsoft Windows 10"
- set name=Microsoft Windows 10
- :: Family: Windows 10
- set family=10
- :: Compatibility: Yes
- set allow=Yes
- ) else (
- :: Name: "Unknown"
- set name=Unknown
- :: Compatibility: No
- set allow=No
- )
- )
复制代码 |
评分
-
查看全部评分
|