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.

47 lines
1.1 KiB

  1. Option Explicit
  2. Dim fs, sh, f, files, i
  3. files = Array(_
  4. "scsiscan.sys", _
  5. "sti.dll", _
  6. "sti_ci.dll", _
  7. "twain_32.dll", _
  8. "twunk_32.exe", _
  9. "twunk_16.exe", _
  10. "usbscan.sys", _
  11. "wiadefui.dll", _
  12. "wiadss.dll", _
  13. "wiafbdrv.dll", _
  14. "wiaservc.dll", _
  15. "wiashext.dll", _
  16. "wiatwain.ds", _
  17. "sti.inf")
  18. WScript.Echo "Building wiasetup.cab in current directory"
  19. Set sh = WScript.CreateObject("WScript.Shell")
  20. Set fs = WScript.CreateObject("Scripting.FileSystemObject")
  21. Set f = fs.CreateTextFile("wiasetup.ddf", True)
  22. f.WriteLine ".Set CabinetNameTemplate=wiasetup*.cab"
  23. f.WriteLine ".Set CabinetName1=wiasetup.cab"
  24. f.WriteLine ".Set ReservePerCabinetSize=8"
  25. f.WriteLine ".Set MaxDiskSize=CDROM"
  26. f.WriteLine ".Set CompressionType=LZX"
  27. f.WriteLine ".Set InfFileLineFormat=(*disk#*) *file#*: *file* = *Size*"
  28. f.WriteLine ".Set InfHeader="
  29. f.WriteLine ".Set InfFooter="
  30. f.WriteLine ".Set DiskDirectoryTemplate=."
  31. f.WriteLine ".Set Compress=ON"
  32. f.WriteLine ".Set Cabinet=ON"
  33. for i = 0 to ubound(files)
  34. f.WriteLine sh.ExpandEnvironmentStrings("""%_NTTREE%\" & files(i) & """ " & files(i))
  35. Next
  36. f.Close
  37. sh.Run "makecab -F wiasetup.ddf", 10, True