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.

62 lines
1.1 KiB

  1. WScript.Echo( "Starting ..." );
  2. try
  3. {
  4. var infgen = new ActiveXObject( "InfGenerator" );
  5. }
  6. catch (e)
  7. {
  8. WScript.Echo( "Failed starting object: " + e.description );
  9. WScript.Quit(1);
  10. }
  11. WScript.Echo( "Setting up connection ..." );
  12. try
  13. {
  14. infgen.SetDB( "ntbldwebdev", "SPBuilds", "buildlab", "perky" );
  15. }
  16. catch (e)
  17. {
  18. WScript.Echo( "Failed setting DB: " + e.description );
  19. WScript.Quit(1);
  20. }
  21. WScript.Echo( "Initializing ..." );
  22. try
  23. {
  24. infgen.InitGen( "update.inf", "update.inf.2" );
  25. }
  26. catch (e)
  27. {
  28. var ex = infgen.InfGenError;
  29. WScript.Echo( "Failed in initialization: " + (ex?ex:"<unknown>") );
  30. WScript.Quit(1);
  31. }
  32. WScript.Echo( "Inserting file ..." );
  33. try
  34. {
  35. infgen.InsertFile( "ntoskrnl.exe" );
  36. infgen.WriteSectionData( "Cache.files", "ntoskrnl.exe" );
  37. }
  38. catch (e)
  39. {
  40. var ex = infgen.InfGenError;
  41. WScript.Echo( "Failed adding file: " + (ex?ex:"<unknown>") );
  42. WScript.Quit(1);
  43. }
  44. try
  45. {
  46. infgen.CloseGen( true );
  47. }
  48. catch (e)
  49. {
  50. var ex = infgen.InfGenError;
  51. WScript.Echo( "Failed during write of new INF: " + (ex?ex:"<unknown>") );
  52. WScript.Quit(1);
  53. }
  54. WScript.Echo( "Successful" );