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.

183 lines
6.2 KiB

  1. @echo off
  2. REM ***************************************************************************
  3. REM This file is used to do a script setup of Whistler Fax
  4. REM ***************************************************************************
  5. REM check whether help is required
  6. if "%1"=="" goto :Usage
  7. if "%1" == "help" goto :Usage
  8. if "%1" == "-help" goto :Usage
  9. if "%1" == "/help" goto :Usage
  10. if "%1" == "-h" goto :Usage
  11. if "%1" == "/h" goto :Usage
  12. if "%1" == "-?" goto :Usage
  13. if "%1" == "/?" goto :Usage
  14. REM check argument
  15. if "%1"=="PER" (
  16. set INFPATH=\perinf
  17. goto :Start
  18. )
  19. if "%1"=="PRO" (
  20. set INFPATH=
  21. goto Start
  22. )
  23. if "%1"=="SRV" (
  24. set INFPATH=\srvinf
  25. goto Start
  26. )
  27. if "%1"=="ENT" (
  28. set INFPATH=\entinf
  29. goto Start
  30. )
  31. if "%1"=="DTC" (
  32. set INFPATH=\dtcinf
  33. goto Start
  34. )
  35. if "%1"=="BLA" (
  36. set INFPATH=\blainf
  37. goto Start
  38. )
  39. if "%1"=="SBS" (
  40. set INFPATH=\sbsinf
  41. goto Start
  42. )
  43. Echo Bad argument
  44. Echo.
  45. goto Usage
  46. REM ***************************************************************************
  47. REM Set FaxSetupDir and FaxBinDir
  48. REM ***************************************************************************
  49. :Start
  50. set FaxSetupDir=%~d0%~p0
  51. if NOT "%@eval[2+2]" == "4" goto WeRunInCMD
  52. set FaxSetupDir=%@PATH[%@FULL[%0]]
  53. :WeRunInCMD
  54. set FaxBinDir=%FaxSetupDir%..
  55. REM ***************************************************************************
  56. REM Unattended Uninstall
  57. REM ***************************************************************************
  58. pushd %FaxSetupDir%
  59. echo *** Starting uninstall of fax ***
  60. start /wait sysocmgr /n /i:faxoc.inf /c /u:uninstall.inf
  61. REM ***************************************************************************
  62. REM Clear the Registry
  63. REM ***************************************************************************
  64. regedit -s FaxOff.reg
  65. REM ***************************************************************************
  66. REM Copy FxsOcmgr.dll, WinFax.dll, and FxsOcmgr.inf first
  67. REM ***************************************************************************
  68. echo *** Copying latest setup binaries and INF ***
  69. xcopy /q /y %FaxBinDir%\fxsocm.dll %SystemRoot%\system32\setup
  70. xcopy /q /y %FaxBinDir%%INFPATH%\fxsocm.inf %SystemRoot%\inf
  71. xcopy /q /y %FaxBinDir%\winfax.dll %SystemRoot%\system32
  72. REM ***************************************************************************
  73. REM Start DBMON, if installing a debug version
  74. REM ***************************************************************************
  75. chkdbg %FaxBinDir%\fxssvc.exe
  76. if ERRORLEVEL 2 goto Install
  77. if not ERRORLEVEL 1 goto Install
  78. start /min dbmon
  79. REM ***************************************************************************
  80. REM Unattended Install
  81. REM ***************************************************************************
  82. REM ***************************************************************************
  83. REM Copy CD binaries to install dir
  84. REM ***************************************************************************
  85. xcopy /q /y \\haifax-bld\SharedFiles\* %FaxBinDir%
  86. :Install
  87. echo *** Starting fax installation ***
  88. if /I "%1"=="PER" start /wait sysocmgr /n /i:faxocper.inf /c /u:install.inf
  89. if /I "%1"=="PRO" start /wait sysocmgr /n /i:faxoc.inf /c /u:install.inf
  90. if /I "%1"=="SRV" start /wait sysocmgr /n /i:faxocsrv.inf /c /u:install.inf
  91. if /I "%1"=="ENT" start /wait sysocmgr /n /i:faxocent.inf /c /u:install.inf
  92. if /I "%1"=="DTC" start /wait sysocmgr /n /i:faxocdtc.inf /c /u:install.inf
  93. if /I "%1"=="BLA" start /wait sysocmgr /n /i:faxocbla.inf /c /u:install.inf
  94. if /I "%1"=="SBS" start /wait sysocmgr /n /i:faxocsbs.inf /c /u:install.inf
  95. REM ***************************************************************************
  96. REM Copy help files (these are not copied by OCM so we have to manualy copy them)
  97. REM ***************************************************************************
  98. echo *** Copying system help files ***
  99. xcopy /q /y %FaxBinDir%\fxsadmin.chm %SystemRoot%\help
  100. xcopy /q /y %FaxBinDir%\fxsadmin.hlp %SystemRoot%\help
  101. xcopy /q /y %FaxBinDir%\fxsshare.chm %SystemRoot%\help
  102. if /I "%1"=="PER" goto :CopyXPHelpFiles
  103. if /I "%1"=="PRO" goto :CopyXPHelpFiles
  104. copy /y %FaxBinDir%\fxsclsvr.chm %SystemRoot%\help\fxsclnt.chm
  105. copy /y %FaxBinDir%\fxscl_s.hlp %SystemRoot%\help\fxsclnt.hlp
  106. copy /y %FaxBinDir%\fxscov_s.chm %SystemRoot%\help\fxscover.chm
  107. goto :CopySymbols
  108. :CopyXPHelpFiles
  109. xcopy /q /y %FaxBinDir%\fxsclnt.chm %SystemRoot%\help
  110. xcopy /q /y %FaxBinDir%\fxsclnt.hlp %SystemRoot%\help
  111. xcopy /q /y %FaxBinDir%\fxscover.chm %SystemRoot%\help
  112. REM ***************************************************************************
  113. REM Copy symbols
  114. REM ***************************************************************************
  115. :CopySymbols
  116. echo *** Copying symbols ***
  117. xcopy /q /y %FaxBinDir%\symbols.pri\retail\exe\* %SystemRoot%\system32
  118. xcopy /q /y %FaxBinDir%\symbols.pri\retail\dll\* %SystemRoot%\system32
  119. xcopy /q /y %FaxBinDir%\symbols.pri\retail\dll\fxsdrv.pdb %SystemRoot%\system32\spool\drivers\w32x86\3
  120. xcopy /q /y %FaxBinDir%\symbols.pri\retail\dll\fxsui.pdb %SystemRoot%\system32\spool\drivers\w32x86\3
  121. xcopy /q /y %FaxBinDir%\symbols.pri\retail\dll\fxswzrd.pdb %SystemRoot%\system32\spool\drivers\w32x86\3
  122. xcopy /q /y %FaxBinDir%\symbols.pri\retail\dll\fxsapi.pdb %SystemRoot%\system32\spool\drivers\w32x86\3
  123. xcopy /q /y %FaxBinDir%\symbols.pri\retail\dll\fxstiff.pdb %SystemRoot%\system32\spool\drivers\w32x86\3
  124. REM ***************************************************************************
  125. REM End
  126. REM ***************************************************************************
  127. popd
  128. goto :End
  129. :Usage
  130. Echo SYNTAX: setup.cmd "Product to install"
  131. Echo "Product to install" is one of the following:
  132. Echo SRV - Installs the Windows Server 2003, Standard Edition Fax Service
  133. Echo BLA - Installs the Windows Server 2003, Web Edition Fax Service
  134. Echo ENT - Installs the Windows Server 2003, Enterprise Edition Fax Service
  135. Echo DTC - Installs the Windows Server 2003, Datacenter Edition Fax Service
  136. Echo PRO - Installs the Windows XP Professional Fax Service
  137. Echo PER - Installs the Windows XP Home Edition Fax Service
  138. Echo SBS - Installs the Small Business Server Fax Service
  139. Echo.
  140. Echo example: setup.cmd SRV
  141. Echo.
  142. :End