if ( $HKEY_CURRENT_USER->Create('Software\\Policies\\Microsoft\\Intern +et 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\\In +ternet Explorer', $IE7) ) { print "We have now enabled the restrictions.\n"; if ( $IE7->Create('Restrictions', $IE8) ) { print "Also good!\n"; if ( $IE8->SetValueEx("NoBrowserOptions", 0, R +EG_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 chang +ed\n"; print $^E,$/; } if ( $IE8->SetValueEx("NoFavorites", 0 , REG_D +WORD, 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,$/; } }
Edit: g0n - Added readmore tags
In reply to Win32 registry wierdness by Necos
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |