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.

39 lines
707 B

  1. @echo off
  2. @SETLOCAL ENABLEEXTENSIONS
  3. set CDF_FNAME=dtest.cdf
  4. set CAT_FNAME=dtest.cat
  5. echo # test cdf file> %CDF_FNAME%
  6. echo [CatalogHeader]>> %CDF_FNAME%
  7. echo Name=%CAT_FNAME%>> %CDF_FNAME%
  8. echo ResultDir=>> %CDF_FNAME%
  9. echo PublicVersion=0x00000100>> %CDF_FNAME%
  10. echo CATATTR1=0x10010001:OSAttr:2:5.x, 2:4.x, 1:1.x>> %CDF_FNAME%
  11. echo #>> %CDF_FNAME%
  12. echo [CatalogFiles]>> %CDF_FNAME%
  13. @dir /a-d /b %SystemRoot%\SYSTEM32\*.* > %COMPUTERNAME%.DIR
  14. FOR /F %%i IN (%COMPUTERNAME%.DIR) DO call :AddToCDF %%i
  15. goto bldcdf_end
  16. :AddToCDF
  17. echo %1=%SystemRoot%\SYSTEM32\%1>> %CDF_FNAME%
  18. goto :EOF
  19. :bldcdf_end
  20. @del %COMPUTERNAME%.DIR
  21. makecat %CDF_FNAME%
  22. @ENDLOCAL