1924
|
1 @echo off
|
2537
|
2 set _mm7_install_dir=I:\_w\mm7install
|
1924
|
3
|
|
4
|
|
5
|
|
6 REM Check Windows Version
|
|
7
|
|
8 ver | findstr /i "5\.0\." > nul
|
|
9 IF %ERRORLEVEL% EQU 0 goto win_2000
|
|
10
|
|
11 ver | findstr /i "5\.1\." > nul
|
|
12 IF %ERRORLEVEL% EQU 0 goto win_xp
|
|
13
|
|
14 ver | findstr /i "5\.2\." > nul
|
|
15 IF %ERRORLEVEL% EQU 0 goto win_2003
|
|
16
|
|
17 ver | findstr /i "6\.0\." > nul
|
|
18 IF %ERRORLEVEL% EQU 0 goto win_vista
|
|
19
|
|
20 ver | findstr /i "6\.1\." > nul
|
|
21 IF %ERRORLEVEL% EQU 0 goto win_7
|
|
22
|
2424
|
23 ver | findstr /i "6\.2\." > nul
|
|
24 IF %ERRORLEVEL% EQU 0 goto win_8
|
|
25
|
|
26 ver | findstr /i "6\.3\." > nul
|
|
27 IF %ERRORLEVEL% EQU 0 goto win_8_1
|
|
28
|
1924
|
29 echo Machine OS cannot be determined.
|
|
30 goto end
|
|
31
|
2424
|
32 :win_8_1
|
|
33 echo Win 8.1
|
|
34 goto win7_init
|
|
35
|
|
36 :win_8
|
|
37 echo Win 8
|
|
38 goto end
|
|
39
|
1924
|
40 :win_7
|
|
41 echo Win 7
|
2424
|
42 :win7_init
|
1924
|
43 reg add HKCU\Environment /f /v "WoMM_MM7_INSTALL_DIR" /t REG_SZ /d "%_mm7_install_dir%"
|
|
44 reg query HKCU\Environment /v "WoMM_MM7_INSTALL_DIR"
|
|
45 goto end
|
|
46
|
|
47 :win_2000
|
|
48 echo Win 2000
|
|
49 goto end
|
|
50
|
|
51 :win_xp
|
|
52 echo Win XP
|
1936
|
53 reg add "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Environment" /f /v "WoMM_MM7_INSTALL_DIR" /t REG_SZ /d "%_mm7_install_dir%"
|
|
54 reg query "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Environment" /v "WoMM_MM7_INSTALL_DIR"
|
1924
|
55 goto end
|
|
56
|
|
57 :win_vista
|
|
58 echo Win Vista
|
|
59 goto end
|
|
60
|
|
61 :win_2003
|
|
62 echo Win 2003
|
|
63 goto end
|
|
64
|
|
65 :check_vars
|
|
66 goto end
|
|
67
|
|
68 :end
|
|
69 pause |