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.

60 lines
1.4 KiB

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