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.

31 lines
790 B

  1. @echo off
  2. echo Resign all catalog files in the current directory tree
  3. echo NOTE: DO NOT RUN THIS IN A SOURCE DEPOT CONTROLLED TREE
  4. pause
  5. set catlist=cjime cwms4 dajavac Dx3 eicona eiconp iasnt4
  6. set catlist=%catlist% mapimig mw770
  7. set catlist=%catlist% osccab PHIME pyime scrdbcat wfc wmi3rd xmldsoc
  8. for %%l in (%catlist%) do call :searchfile %%l
  9. goto :end
  10. :searchfile
  11. echo Searching for %1.ca_ and %1.cat
  12. for /f %%f in ('dir /s /b %1.ca_') do call :signfile %%f
  13. for /f %%f in ('dir /s /b %1.cat') do call :signfile %%f
  14. goto :end
  15. :signfile
  16. echo resigning %1
  17. if /i "%~x1" == ".ca_" (
  18. expand -r %1 %~p1
  19. )
  20. signtool sign /q %SIGNTOOL_SIGN% %~p1%~n1.cat
  21. if /i "%~x1" == ".ca_" (
  22. compress -zx21 -r %~p1%~n1.cat %~p1
  23. del %~p1%~n1.cat
  24. )
  25. goto :end
  26. :end