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.

67 lines
1.4 KiB

  1. <HTML>
  2. <HEAD>
  3. <META NAME="GENERATOR" Content="Microsoft Developer Studio">
  4. <META HTTP-EQUIV="Content-Type" content="text/html; charset=iso-8859-1">
  5. <OBJECT ID=pchealth classid=CLSID:FC7D9E02-3F9E-11d3-93C0-00C04F72DAF7></OBJECT>
  6. <TITLE>Document Title</TITLE>
  7. </HEAD>
  8. <BODY>
  9. <SCRIPT LANGUAGE=javascript>
  10. <!--
  11. var g_cb;
  12. function cb_onComplete( cb, hr )
  13. {
  14. if(hr == 0)
  15. {
  16. alert( "Done!" );
  17. }
  18. else
  19. {
  20. alert( "An error occured during compression: " + hr );
  21. }
  22. g_cb = null;
  23. }
  24. function button_exec()
  25. {
  26. // debugger;
  27. g_cb = pchealth.CreateObject_Cabinet();
  28. var fso = new ActiveXObject( "Scripting.FileSystemObject" );
  29. var f = fso.GetFolder( idSrcFolder.value );
  30. for(var fc = new Enumerator( f.Files ); !fc.atEnd(); fc.moveNext())
  31. {
  32. g_cb.AddFile( fc.item().Path );
  33. }
  34. g_cb.onComplete = cb_onComplete;
  35. g_cb.Compress( fso.GetAbsolutePathName( idDstFile.value ) );
  36. }
  37. function button_abort()
  38. {
  39. if(g_cb != null)
  40. {
  41. g_cb.Abort();
  42. }
  43. }
  44. //-->
  45. </SCRIPT>
  46. <LABEL FOR=idSrcFolder>Select the source folder: </LABEL><INPUT size=40 id="idSrcFolder"><BR>
  47. <LABEL FOR=idDstFile >Select the destination file:</LABEL><INPUT type="file" id="idDstFile" ><BR>
  48. <INPUT type="button" value="Start" onClick="button_exec();">&nbsp;
  49. <INPUT type="button" value="Abort" onClick="button_abort();">
  50. </BODY>
  51. </HTML>