Reset Windows Firewall (Perl)

This code can be found in Chapter 3 of Windows Server 2003 Networking Recipes

Purchase XP Cookbook or Networking Recipes for only $25 plus shipping! While supplies last.

Find out how to download all of the Perl code from this site.

# From the book "Windows Server 2003 Networking Recipes"

# This code restores the Windows Firewall to its default settings

use Win32::OLE;

$Firewall = Win32::OLE->new('HNetCfg.FwMgr');
$Firewall->RestoreDefaults();
print "Default settings restored.\n";

This code has been viewed 913 times.

New from the creators of TechTasks.com: StatSheet.com