home *** CD-ROM | disk | FTP | other *** search
/ PC Administrator / spravce.iso / WinWash / update.pl < prev    next >
Encoding:
Perl Script  |  2000-09-12  |  549 b   |  24 lines

  1. #!/usr/bin/perl
  2.  
  3. # change these two variables to fit your network
  4.  
  5. # computers running WinWasher
  6. @comps   = ('comp01', 'comp02', 'comp03');
  7. # name of share and path of windows
  8. $share   = "\\C\$\\winnt\\";  
  9.  
  10. # update all computers
  11. foreach $c (@comps) {
  12.   update_service($c);
  13. }
  14.  
  15. # update one computer
  16. sub update_service {
  17.   my $comp = shift(@_);
  18.   print  "Updating $comp...";
  19.   system "netsvc WinWasher $comp /stop";
  20.   system "copy   WinWasher.exe   $comp$share";
  21.   system "netsvc WinWasher $comp /start";
  22.   print  "done\n";
  23. }
  24.