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.

119 lines
2.3 KiB

  1. @echo off
  2. rem The settings below are edited by the RAS SETUP program.
  3. rem
  4. rem RASR is 1 if there are RAS drivers loaded, 0 otherwise.
  5. rem RASL is 1 if there are non-RAS LM drivers loaded, 0 otherwise.
  6. rem RASB is 1 if running DOS Basic, 0 otherwise.
  7. rem RASC is the computer name under DOS Basic, empty otherwise.
  8. set RASR=0
  9. if "%RASR%" == "1" goto parseargs
  10. echo.
  11. echo No Remote Access ports configured.
  12. echo Use Remote Access Setup to configure one.
  13. echo.
  14. goto exit
  15. :parseargs
  16. set RASR=
  17. set RASL=0
  18. set RASB=0
  19. set RASC=
  20. if "%1" == "" goto load
  21. if "%1" == "/u" goto arg2
  22. if "%1" == "/unload" goto arg2
  23. if "%1" == "/U" goto arg2
  24. if "%1" == "/UNLOAD" goto arg2
  25. goto error_exit
  26. :arg2
  27. if "%2" == "" goto unload
  28. if "%2" == "/y" goto unload
  29. if "%2" == "/yes" goto unload
  30. if "%2" == "/Y" goto unload
  31. if "%2" == "/YES" goto unload
  32. goto error_exit
  33. :load
  34. if "%RASB%" == "1" goto loadbasic
  35. if "%RASL%" == "0" goto startwksta
  36. goto dontstartwksta
  37. :startwksta
  38. echo Starting WORKSTATION service...
  39. net start workstation
  40. if errorlevel 1 goto exit
  41. :dontstartwksta
  42. load asybeui
  43. if errorlevel 1 goto loadfailure
  44. goto exit
  45. :loadbasic
  46. load asybeui
  47. if errorlevel 1 goto loadfailure
  48. echo Starting WORKSTATION service...
  49. net start workstation %RASC%
  50. goto exit
  51. :unload
  52. if "%RASB%" == "1" goto unloadbasic
  53. rasdial >NUL
  54. unload asybeui
  55. if "%RASL%" == "0" goto stopwksta
  56. goto exit
  57. :stopwksta
  58. echo Stopping WORKSTATION service...
  59. net stop workstation %2
  60. goto exit
  61. :unloadbasic
  62. echo.
  63. echo Can't unload when running DOS Basic.
  64. echo.
  65. goto exit
  66. :error_exit
  67. echo.
  68. echo RASLOAD loads the Remote Access Service DOS TSRs. These TSRs
  69. echo must be loaded before trying to use the Remote Access software.
  70. echo.
  71. echo Usage: %0 [/unload [/yes]]
  72. echo.
  73. echo /unload This switch causes RASLOAD to unload the Remote Access
  74. echo Service DOS TSRs. Unloading the TSRs frees up more
  75. echo DOS memory to run your applications.
  76. echo.
  77. echo /yes This switch answers "YES" to all Lan Manager prompts.
  78. echo.
  79. goto exit
  80. :loadfailure
  81. echo.
  82. echo Failure loading Remote Access TSRs. Type RASHELP 228 for more
  83. echo information.
  84. echo.
  85. :exit
  86. set RASR=
  87. set RASL=
  88. set RASB=
  89. set RASC=
  90. echo.