user_pref("app.update.auto", false); user_pref("app.update.enabled", false); user_pref("autoupdate.enabled", false); #### user_pref("browser.bookmarks.file", "h:\\Netscape\\bookmark.htm"); .. #### use warnings; my $fh; my $myfile = 'update.txt'; unless (open($fh,"<",$myfile)) { die "Can't open $myfile: $!\n"; } my %update_words = (); ## Read in update file strings ################################## while (<$fh>) { chomp; $update_words{$_}++; print "$_\n"; } close($fh); ################################# # Find files that need updating ################################# use File::Path; @files = <"c:/documents and settings/*">; foreach $file (@files) { print $file . "\n"; clean_extension($file); } sub clean_extension { # For each of the mozilla profiles in this users profile @exfiles = <"@_/Application Data/Mozilla/Firefox/Profiles/*">; foreach $exfiles (@exfiles) { if ( -e "$exfiles/user.js" ) { print "$exfiles/user.js\n"; open(USERPREF, "$exfiles/user.js") or die "Profile open failed."; # Lines look like: user_pref("app.update.auto", false); while() { chomp; if (exists($update_words{$_})) { print "found $_ \n"; # Write } else { print "not found $_ \n"; # write $update_words{$_} to file Outfile } #} } } } }