if ( $HKEY_CURRENT_USER->Create('Software\\Policies\\Microsoft\\Internet Explorer\\Restrictions', $IE6 ) ) { print "Created IE restrictions!\n"; if ( $IE6->SetValueEx("NoBrowserOptions", 0 , REG_DWORD, 1) ) { print "Disabled browser options\n"; } else { print "Browser options still enabled.\n"; print $^E,$/; } if ( $IE6->SetValueEx("NoBrowserBars", 0 , REG_DWORD, 1) ) { print "Disable changes to browser bars\n"; print $^E,$/; } else { print "Browser bars can be altered still\n"; print $^E,$/; } if ( $IE6->SetValueEx("NoFavorites" , 0 , REG_DWORD, 1) ) { print "Disabled favorites menu\n"; print $^E,$/; } else { print "Favorites menu still enabled\n"; print $^E,$/; } $IE6->Close() && print "Done here!\n"; } else { #print $^E,$/; if ( $HKEY_CURRENT_USER->Create('Software\\Policies\\Microsoft\\Internet Explorer', $IE7) ) { print "We have now enabled the restrictions.\n"; if ( $IE7->Create('Restrictions', $IE8) ) { print "Also good!\n"; if ( $IE8->SetValueEx("NoBrowserOptions", 0, REG_DWORD, 1) ) { print "Disabled browser options.\n"; } else { print "Browser options not disabled\n"; print $^E,$/; } if ( $IE8->SetValueEx("NoBrowserBars", 0, REG_DWORD, 1) ) { print "Disable changes to browser bars.\n"; } else { print "Browser bars still can be changed\n"; print $^E,$/; } if ( $IE8->SetValueEx("NoFavorites", 0 , REG_DWORD, 1) ) { print "Disabled favorites menu.\n"; } else { print "Favorites menu not disabled\n"; print $^E,$/; } $IE8->Close() && print "Restrictions set.\n"; } else { print "Restriction creation failed\n"; print $^E,$/; } $IE7->Close && print "Restriction setup complete.\n"; } else { print "Key creation failed\n"; print $^E,$/; } }