Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

81 lines
2.2 KiB

  1. ::This batch file will install MIT products silently (IS 5.5)
  2. ::Copyright 2001 Microsoft Corporation
  3. @echo off
  4. IF .%OS% == .Windows_NT goto WinNT
  5. :Win9X
  6. :: GET CURRENT PATH
  7. echo @prompt set ~D=$P$_> %TEMP%.\~tmp1.bat
  8. %COMSPEC% /C%TEMP%.\~tmp1.bat > %TEMP%.\~tmp2.bat
  9. for %%A in (%TEMP%.\~tmp2 del) do call %%A %TEMP%.\~tmp?.bat
  10. set PATHVAR=%~D%
  11. :: WINDOWS 9x SILENT INSTALL FUNCTIONS
  12. :: CHECK FOR EXISTENCE OF ORUN32.INI TO DETERMINE IF PRODUCT IS ALREADY INSTALLED
  13. Find /I "Affinity=" "%windir%\orun32.ini"
  14. ECHO.
  15. ::Set ErrorLevel for Find command under Win9X
  16. ::Errorlevel is not set automatically by Win9X
  17. :: Routine based on ERRLVL.BAT v2.11 by Vernon Frazee, 12/94
  18. :: --------------------------------------------------------------------
  19. set C=
  20. set EL=ERRORLEVEL
  21. for %%A in (A B) do set %%A=0 1 2 3 4 5
  22. if not %EL% 250 set A=%A% 6 7 8 9
  23. if not %EL% 200 set B=%A%
  24. for %%A in (1 2) do if %EL% %%A00 set C=%%A
  25. for %%A in (%B%) do if %EL% %C%%%A0 set D=%%A
  26. if (%C%%D%)==(0) set D=
  27. set C=%C%%D%
  28. for %%A in (%A%) do if %EL% %C%%%A set ERRLVL=%C%%%A
  29. set %EL%=%ERRLVL%
  30. for %%A in (A B C D EL ERRLVL) do set %%A=
  31. IF ERRORLEVEL 2 goto FirstInstall9X
  32. IF ERRORLEVEL 0 goto SecondInstall9X
  33. :FirstInstall9x
  34. ECHO Microsoft Interactive Training is NOT installed.
  35. ECHO Initiating Silent Setup...
  36. "%PATHVAR%\setup\setup.exe" -S -f1"%PATHVAR%\setup\Silent.iss"
  37. goto EndBatch
  38. :SecondInstall9X
  39. ECHO A version Microsoft Interactive Training is currently installed.
  40. ECHO Initiating Silent Setup...
  41. "%PATHVAR%\setup\setup.exe" -S -f1"%PATHVAR%\setup\second.iss"
  42. goto EndBatch
  43. :WinNT
  44. :: GET CURRENT PATH
  45. for /f "tokens=*" %%A in ('cd') do @set PATHVAR=%%A
  46. Find /I "Affinity=" "%windir%\orun32.ini"
  47. ECHO.
  48. IF ERRORLEVEL 1 goto FirstInstallNT
  49. IF ERRORLEVEL 0 goto SecondInstallNT
  50. :FirstInstallNT
  51. ECHO Microsoft Interactive Training is NOT installed.
  52. ECHO Initiating Silent Setup...
  53. "%PATHVAR%\setup\setup.exe" -S -f1"%PATHVAR%\setup\Silent.iss"
  54. goto EndBatch
  55. :SecondInstallNT
  56. ECHO A version Microsoft Interactive Training is currently installed.
  57. ECHO Initiating Silent Setup...
  58. "%PATHVAR%\setup\setup.exe" -S -f1"%PATHVAR%\setup\second.iss"
  59. goto EndBatch
  60. :EndBatch