1924
|
1 @echo off
|
1936
|
2 set _mm7_install_dir=C:\Program Files\Buka\MMCollection\MM_VII
|
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
|
|
23 echo Machine OS cannot be determined.
|
|
24 goto end
|
|
25
|
|
26 :win_7
|
|
27 echo Win 7
|
|
28 reg add HKCU\Environment /f /v "WoMM_MM7_INSTALL_DIR" /t REG_SZ /d "%_mm7_install_dir%"
|
|
29
|
|
30 reg query HKCU\Environment /v "WoMM_MM7_INSTALL_DIR"
|
|
31 goto end
|
|
32
|
|
33 :win_2000
|
|
34 echo Win 2000
|
|
35 goto end
|
|
36
|
|
37 :win_xp
|
|
38 echo Win XP
|
1936
|
39 reg add "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Environment" /f /v "WoMM_MM7_INSTALL_DIR" /t REG_SZ /d "%_mm7_install_dir%"
|
1924
|
40
|
|
41
|
1936
|
42 reg query "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Environment" /v "WoMM_MM7_INSTALL_DIR"
|
1924
|
43 goto end
|
|
44
|
|
45 :win_vista
|
|
46 echo Win Vista
|
|
47 goto end
|
|
48
|
|
49 :win_2003
|
|
50 echo Win 2003
|
|
51 goto end
|
|
52
|
|
53 :check_vars
|
|
54 goto end
|
|
55
|
|
56 :end
|
|
57 pause |