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.

37 lines
572 B

  1. #
  2. # Switch back to the normal mapping.
  3. #
  4. use Cwd;
  5. ################################################################################
  6. $fileMap = "$ENV{INIT}\\pchealth.orig.mapping";
  7. chdir( "$ENV{SDXROOT}\\admin" );
  8. open OPENED, "sd opened 2>&1|";
  9. while(<OPENED>)
  10. {
  11. if(/([^#]*)#([0-9]*) - (.*)/o)
  12. {
  13. print "\nWARNING: you have opened files. Switch aborted...\n\n";
  14. exit 10;
  15. }
  16. }
  17. close(OPENED);
  18. open MAP, "$fileMap" || die "Can't open $fileMap";
  19. open CLIENT, "|sd client -i";
  20. while(<MAP>)
  21. {
  22. print CLIENT "$_";
  23. }
  24. close CLIENT;
  25. close MAP;
  26. system "sd sync"