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.

64 lines
1.6 KiB

  1. @REM
  2. @REM turn echo off unless Verbose is defined
  3. @REM
  4. @echo off
  5. if DEFINED _echo echo on
  6. if DEFINED verbose echo on
  7. goto start
  8. :start
  9. setlocal
  10. @REM
  11. @REM figure out the home path for SDX.CMD so we can
  12. @REM prepend %PATH% correctly and work without a drive letter
  13. @REM and find support files without being in the home dir
  14. @REM
  15. set SCRIPT=%0
  16. set SCRIPT=%SCRIPT:.cmd=%
  17. for %%i in (%SCRIPT%.cmd) do set STARTPATH=%%~dp$PATH:i
  18. set STARTPATHPA=%STARTPATH%%PROCESSOR_ARCHITECTURE%
  19. @REM
  20. @REM first argument is always the operation. let the perl script
  21. @REM check it
  22. @REM
  23. set SDCMD=%1
  24. shift
  25. if "%SDCMD%"=="" (
  26. echo.
  27. echo.
  28. echo No arguments.
  29. set SDCMD=usage
  30. )
  31. :script
  32. @REM
  33. @REM always use our tools
  34. @REM
  35. @REM append a final ';' so any trailing '\' don't confuse Perl
  36. @REM
  37. set PATH=%STARTPATH%;%STARTPATHPA%;%PATH%;
  38. set PATH_NO_QUOTES=%PATH:"=%
  39. @REM
  40. @REM call the script
  41. @REM
  42. @REM -S helps perl find the .PL script in %PATH%
  43. @REM -I helps it find .PM modules
  44. @REM % * is all args
  45. @REM
  46. perl -I"%PATH_NO_QUOTES%" -I"%STARTPATHPA%\perl\lib" -I"%STARTPATHPA%\perl\site\lib" -S sdx.pl %SDCMD% %*
  47. echo.
  48. echo.
  49. goto :end
  50. :end
  51. endlocal