Source code of Windows XP (NT5)
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.

61 lines
1.4 KiB

  1. @echo off
  2. REM ------------------------------------------------------------------
  3. REM
  4. REM tscert.cmd
  5. REM applies signature to terminal server files
  6. REM
  7. REM owner: MadanA
  8. REM
  9. REM Copyright (c) Microsoft Corporation. All rights reserved.
  10. REM
  11. REM ------------------------------------------------------------------
  12. if defined _CPCMAGIC goto CPCBegin
  13. perl -x "%~f0" %*
  14. goto :EOF
  15. #!perl
  16. use strict;
  17. use lib $ENV{RAZZLETOOLPATH} . "\\PostBuildScripts";
  18. use lib $ENV{RAZZLETOOLPATH};
  19. use PbuildEnv;
  20. use ParseArgs;
  21. sub Usage { print<<USAGE; exit(1) }
  22. tscert [-l <language>]
  23. Applies signature to terminal server files
  24. USAGE
  25. parseargs('?' => \&Usage);
  26. # *** NEXT FEW LINES ARE TEMPLATE ***
  27. $ENV{"_CPCMAGIC"}++;exit(system($0)>>8);
  28. __END__
  29. :CPCBegin
  30. set _CPCMAGIC=
  31. setlocal ENABLEDELAYEDEXPANSION ENABLEEXTENSIONS
  32. REM *** BEGIN YOUR CMD SCRIPT BELOW ***
  33. set TsFileList=termdd.sys tdasync.sys tdipx.sys tdnetb.sys tdpipe.sys tdspx.sys
  34. set TSFileList=%TsFileList% tdtcp.sys tsddd.dll rdpdd.dll rdpwd.sys rdpwsx.dll
  35. for %%f in (%TsFileList%) do call :TsSign %_NTPOSTBLD%\%%f
  36. goto end
  37. :TSSign
  38. REM Only sign file if it is not already signed
  39. tscrtvfy.exe %1
  40. if "%errorlevel%" == "0" (
  41. call logmsg.cmd "Image %1 is already signed (Not signing again)"
  42. goto end
  43. )
  44. call ExecuteCmd "tscrtadd.exe %1"
  45. if not "%errorlevel%" == "0" (
  46. set errors=%errorlevel%
  47. )
  48. goto end
  49. :end
  50. seterror.exe "%errors%"& goto :EOF