Thursday, March 17, 2016

Firefox setting for all users - Deployment guide

Firefox is one of the most versatile browsers out there as far as being able to customize the settings for it, its huge selection of addons and its ability to shine where where other browsers like Internet Explorer and Chrome might not be as forgiving when it comes to displaying web pages.

This post is mainly going to show you in easy steps how to deploy Firefox on a machine and have global settings adjusted for all users. I will have several examples that solve annoyances that many users have experienced.

Once the configuration files are in place any new user and or Mozilla Firefox profiles that are created from that point forward will adhere to certain predefined guidelines. Also any already existing profiles will not be effected by the change.

The Download of a pre-configured file is at the bottom of this blog, there is a list of setting that are explicitly set as well.

Lets get right to it!

A couple of prerequisites to assist you in the endeavor:

1) You must be an administrator on the machine
2) Enabling file extensions is a must for this project
3) Showing hidden files and protected operating system files is helpful
4) Download Notepad++ is once again very helpful as a text editor but not required.

First lets make a New Folder somewhere for this project to keep things easy to find. We will call this your 'working folder'. Once you do that you will need to create two files with non popular files extensions.

1) Mozilla.cfg
2) local-settings.js

To make these files, open your working folder, right click and choose new, then new text file. Once one new text files is created make sure it looks something like this: New Text Document.txt. Notice the files extension '.txt' shows. Right click and choose 'rename' then change it to 'local-settings.js'. Then create another text file and do the same renaming it to 'Mozilla.cfg'.

Once you have those two files right click on them and choose edit with Notepad++. You will now be able to easily edit these files in the future if you need to make any changes. Lets start with the first file we created. The 'local-settings.js'. Right click, edit with Notepad++ or your preferred text editor.

This file is going to be a static file, and will contain only two lines. These two lines will tell Firefox that we will be using custom settings. The contents of this file is:

pref("general.config.obscure_value", 0);
pref("general.config.filename", "mozilla.cfg");

These basically tell Firefox to look for a file called 'Mozilla.cfg', and to use the setting within that file to set your choice of global setting for all users going forward on a particular machine.

The 'local-settings.js' file will be placed in the following location; of which depend on if you use the true 64 bit version of Firefox or the standard 32 bit version of Firefox. Those locations are as follows:

32 bit FireFox:
C:\Program Files (x86)\Mozilla Firefox\defaults\pref\local-settings.js

64 bit FireFox:
C:\Program Files\Mozilla Firefox\defaults\pref\local-settings.js

Next lets move on to where the magic happens which is the 'Mozilla.cfg' file. Lets edit this file now and I will show you several examples of settings that can help improve a first time users experience with Mozilla Firefox. First off the first line of the file must only contain '//'. Any additions lines containing those two '//' will be used for comment purposes only which means that they will not be read as configurations in Mozilla Firefox. Below is an example of a 'Mozilla.cfg' file with some settings designed to provide a positive experience removing any annoyances as of this writing.

//
//sets Google as the default search engine instead of Yahoo
pref("browser.search.geoSpecificDefaults", false); 
pref("browser.search.defaultenginename.US", "data:text/plain,browser.search.defaultenginename.US=Google");

// set FireFox Default homepage 

defaultPref("browser.startup.homepage", "data:text/plain,browser.startup.homepage=https://startpage.com");

// Don't show Whats New on first run after every update

pref("browser.startup.homepage_override.mstone","ignore");

// disables the 'know your rights' button from displaying on first run

pref("browser.rights.3.shown", true);
pref("browser.usedOnWindows10", true);

//disable default browser check

pref("browser.shell.checkDefaultBrowser", false);

// set all plugins to always activated

pref("plugin.default.state", 2);

// hide choose what i share that pops up at the bottom of the browser after the first minute

lockPref("datareporting.policy.dataSubmissionPolicyBypassNotification", true);

// disables the request to send performance data from displaying 

pref("toolkit.telemetry.prompted", 2); 
pref("toolkit.telemetry.rejected", true);

// do not block popups - can only be default or locked pref
defaultPref("dom.disable_open_during_load", false);

// prevent reader view from popping down

pref("reader.parse-on-load.enabled",false);


// The next 3 lines shows you how to clear all browsing data/history upon close

//lockpref("privacy.sanitize.migrateFx3Prefs", true);
//lockpref("privacy.sanitize.promptOnSanitize", false);
//lockpref("privacy.sanitize.sanitizeOnShutdown", true);
// http://www.pcc-services.com/kixtart/firefox-lockdown.html
// This last line allows your browser to operate exclusively in Private Browsing Mode
//pref("browser.privatebrowsing.autostart", true);


This file will go into the following location depending on if you are 32 bit or 64 bit:

32 bit FireFox:
C:\Program Files (x86)\Mozilla Firefox\mozilla.cfg

64 bit FireFox:
C:\Program Files\Mozilla Firefox\mozilla.cfg

It is important to note here some of the settings and what they mean. We see things like 'defaultpref' lets go over them.

pref
    sets the preference as if a user had set it, every time you start the browser. So users can make changes, but they will be erased on restart. If you set a particular preference this way, it shows up in about:config as "user set". 

defaultPref
    is used to alter the default value, though users can set it normally and their changes will be saved between sessions. If preferences are reset to default through the GUI or some other method, this is what they will go back to. Appears in about:config as "default". 

lockPref
    is used to lock preferences so they cannot be changed through the GUI or about:config. In many cases the GUI will change to reflect this, graying out or removing options. Appears in about:config as "locked". Some config items require lockPref to be set, such as app.update.enabled. It will not work if it set with just pref.

clearPref
    can be used to "blank" certain preferences. This can be useful e.g. to disable functions that rely on comparing version numbers. 

It is important that not all of these prefixes can be used with every single setting. If FireFox does not launch when deploying other custom settings it is likely a bad prefix so it is a good idea to add and test you setting one by one to make sure they take. and do not cause FireFox to not start. 

A good resource is here:
http://www.pcc-services.com/kixtart/firefox-lockdown.html

Other settings you might have to hunt for. If you are familiar with 'about:config' you should know that a lot of those setting can be used in the 'Mozilla.cfg' file, but not all

Another good file to have is the 'override.ini' This file will eliminate the import wizard. More information on that is located below as well as some of what we already went over:
http://www.itninja.com/question/firefox-18-deployment-issues-config-problems

When Uninstalling Firefox, it is important to remove the files that you created and placed otherwise after the uninstall of Firefox will request a reboot to finish removing the files.

FireFox Auto download/clean install of FireFox and set up of default setting for all users


I have created two exe files that will do the following:
1) Uninstall the current version of Firefox ( either 64 bit or 32 bit whichever your choose. I recommend that IF you are on a 64 bit Windows system you use the 64 bit build instead of the 32 bit one as it is more stable and performs better ).
2) Remove any of the above mentioned files as above to allow for default setting for all users.
3) Grab the latest version of Firefox from the official Firefox Website and install it, and set setting for all users files.
4) Delete the Installer file.

There are 3 files for your viewing pleasure.

1) 64 bit beta version ( will not uninstall 32 bit versions )
2) 32 bit stable version
3) An example of the mozilla.cfg file being used if there is not one chosen ( below )

Theses installs will NOT delete any bookmarks, favorites, preferences, etc.

The mozilla cfg file is embedded in the exe with some default setting to allow you to see what setting are being used and how to do it.

IF you choose to and want to use your own configuration file, you can modify my example or you can build you own and simply place it in the same directory as the exe file is.. It is that simple.

Some of the setting I have found that works good and reduces frustration for user are:

1) set Google as the default search engine ( I simply HATE YAHOO as a search, too much spam and ads ).
2) Uses https://startpage.com as home page ( secure search engine that does not track ).
3) Don't show Whats New on first run after every update.
4) Disables the 'know your rights' button from displaying on first run.
5) Do not ask or check if Firefox is default browser.
6) Set all plugins to always activated.
7) Hide choose what i share from popping up at the bottom after about a minute.
8) Do not block popups.
9) Prevent reader view displaying on a page for the first time.
10) Set do not track.
11) Clears the cache ONLY When Firefox closes ( helps prevent cache files from creating issues and keeps clutter down on your system )
12) Disable Firefox's refresh notification. see the following articles:
http://techdows.com/2016/05/firefox-reinstall-to-prompt-for-a-refresh.html
https://support.mozilla.org/en-US/questions/1084402

As always you can create your own custom files, modify my setting and activate other setting by simply removing the // at the beginning of the lines.

If Firefox does not start after changing setting it is most likely one of the setting is set wrong or in conflict with another.

Here is the Download location for the project


August 10 2016 changes:

1) Structured code(x64)
2) Changed the way I looked for and deleted previous config files(x64)
3) Minor text changes(x64)
4) Added the following line to the cfg file(x64): pref("browser.disableResetPrompt", true);

Saturday, January 4, 2014

How to fix Flash Player crashes in Firefox by disabling plugin-container.exe

IMPORTANT: MOZILLA HAS BROKE THIS METHOD OF DISABLING THE PLUGIN CONTAINER :(

please check here an alternate fix

Disable the dreaded plugin-container.exe in Mozilla Firefox:

In attempt to find a solution to the flash player constantly crashing Mozilla Firefox, I believe I have found a method for some users. As you know flash player crashes within Mozilla Firefox are overwhelmingly common, and nobody is attempting to think outside the box for a solution. I can confirm will work for users experiencing crashing after using Firefox and flash player for a period of time. This fix will NOT work for everyone. Users experiencing crash upon start for Firefox and flash player will not most likely work for that issue, but please feel free to try. 
Get Adobe flash player here . Please be sure to UNCHECK the McAfee as that is just additional BLOAT in my opinion, or just go here for an automated installer

As many of you may or may not know the Mozilla Firefox plugin-container.exe is how Firefox handles some plugins, and if you are here chances are you experienced a flash player crash. Needless to say this in MY opinion has been of bad design. High CPU usage is one notable side effect of using it. I am going to show you how to disable it, and have all your plug in running in Firefox instead of using the plugin-container.exe.

This solution I can’t take full credit for, however, testing with two persons which my deletion of the prefetch files didn’t work, this method did solve their problems of flash player crashing Firefox. That method is to create an environmental variable for either the current logged on user or any user on the machine to prevent the use of Mozilla’s plugin-container.exe which flash player runs inside of when you visit a flash player site. I have tested this method for about a week, and suffered no ill effects when going to Flash sites, Silverlight sites, java sites, and adobe reader plugins. This article in the link below shows you how and what to do, and it is extremely simple. I have also created .reg files that will accomplish the same thing that are in my sharable folder called PluginContainer.rar. You will need winrar to open the archive files. http://www.rarlab.com/

http://www.fluxbytes.com/software-tips/how-to-disable-plugin-container-exe/

I would also like to point out that disabling the plugin-container.exe has successfully solved a silver-light crash as well 



I would like to point out that a thread was started called:

"Proposed new solution to some Flash Player problems”

In the Mozilla forums which involved contributors and moderators. Needless to say the moderators and contributors refused to do any testing of my proposed solution. As the vast majority of users want a click and fix solution, and do not want to sit and fiddle with code, and do things they cannot understand because they are not computer literate. I offer at the bottom of page a few links to Mozilla forums where proof of my methods can resolve these issues.

Flash player protected mode: Automated script to disable protected mode for flash player



I would like to give a special thanks to the following Mozilla forum members for assisting me in confirming my testing and willing to try my methods:

7246291


mgenoves


Sonoko


Datamaniak


Also thanks to Adobe forum member Troudhyl. Even though either method or various other methods we tried didn’t work for his flash player crash upon startup of some links, this helped me to confirm what it didn’t resolve for sure. Over on the right column you can see some of my other methods.


Below is the link for the folder with the proposed fixes, and please be sure to read the info.txt file prior please.
Off to the right column of this blog you can look at a few other proven methods as well. You will need winrar to open the archive files. http://www.rarlab.com/

YouTube tutorial.

Please note that i can provide limited technical support for these. There is the info word document and text file available to read. I tried to make this a simple as possible. Please be sure to read these.

Best Regards to all


LINK TO FOLDER FOR FIXES 

Here are some links to my proven cases of persons who have tried my methods:

https://support.mozilla.org/en-US/questions/981705

https://support.mozilla.org/en-US/questions/981332

https://support.mozilla.org/en-US/questions/980349

 

NEVER INSTALL FLASH PLAYER MANUALLY AGAIN:

Be sure to Check out my other post for complete uninstall, clean up of all flash files, and re-install from a script. http://adobeflashcleanup.blogspot.com/

Thursday, December 26, 2013

Blocking advertisements with Firefox

Don't you just hate it when your page blows up with ads, pop-up ads, and all those flash video ads? Well, there is a great solution for Mozilla Firefox users out there Called Adblock Plus. That Adblock Plus does is prevent the ads from loading on your page, presenting a cleaner less contested look on your page. Just on Google search pages, the entire right hand column is gone as they are all advertisements that are paid for if you use AdBlock Plus, without it, you will see countless numbers of advertisements there. That is just one example.


Firefox with Adblock disabled for a Google search for dog food
Social Networking sites are littered with ads as well. Some of these ads can have malicious content. My Experience working in a cooperate environment shows that people often click on ads accidentally and they can have malicious content resulting in virus infection of your machine. I have analyzed countless machines Internet history and traced an infection to an advertisement of some kind that sneaks through with malicious content. So, this can also help protect you in ways that you might not have though of.

Firefox with Adblock enabled for a Google search for dog food

Preforming a Google search for ' add-ons ' and the first results yields the Mozilla Fireflx add-on page. Off to the left click on ' popular ' and its the very first add-on on the list. All you have to do is install it from there.

There will be a little stop sign in the lower right corner of your page. That's where it lives by default. You can also go into the Firefox menus and under options then toolbar layout you can drag that icon somewhere else like up top somewhere . Mine actually lives in the upper right corner of the page, thus allowing me to close the add-on bar.

The Adblock Plus direct link is here.

Best Regards to all

Tuesday, December 24, 2013

Disable protected mode in Adobe Flash player with a script the easy way



I have created a script to disable protected mode in Adobe Flash Player for either 64 bit or 32 bit version so people don't have to go in and fiddle with operating system files as that does sometimes resolve the issue of flash player crashing. The script is automated and smart enough to let you know if you have protected mode enabled or not. It will detects if you are on a 64 bit version of windows or 32 bit version. It will detect if the mms.cfg file exists or not in the directory. The script will also tell you if you need to get Flash player installed as well.

If you need Adobe Flash Player installed on your system, simply go here: Get Adobe Flash Player . Please be sure to UNCHECK the McAfee as that is just additional BLOAT in my opinion.


Here are few more articles concerning disable protected mode in Flash player ( Adobe site article )  

All you have to do is click the link below, and the script will open up in readable form in case you want to see what it does and how it does it. When you are ready just up at the top click download, and then run it. NOTE: You might have to right click and run as admin if you get any permission or access denied, i cannot resolve these issues

 Disable Protect Mode script 

If this issue does not resolve your Mozilla Firefox crashing Flash Player then you can check out my other Blog for additional fixes. HERE

YouTube video tutorial

Please note that i can provide limited technical support for this. This particular script is self-explanatory. 


NEVER INSTALL FLASH PLAYER MANUALLY AGAIN

Be sure to Check out my other post for complete uninstall, clean up of all flash files, and re-install from a script. http://adobeflashcleanup.blogspot.com/


Best Regards

Sunday, December 22, 2013

How to fix flash player crashes in Firefox by deleting certain prefetch files



In attempt to find a solution to the flash player constantly crashing Mozilla Firefox, I believe I have come up with a solution for some users. As you know flash player crashes within Mozilla Firefox are overwhelmingly common, and nobody is attempting to think outside the box for a solution. I have found two solutions that I can confirm will work for users experiencing crashing after using Firefox and flash player for a period of time. This fix will NOT work for everyone. Users experiencing crash upon start for Firefox and flash player will not most likely work for that issue, but please feel free to try. 
Get Adobe flash player here . Please be sure to UNCHECK the McAfee as that is just additional BLOAT in my opinion.

Keep selected prefetch files clear:
The first solution I came up with involves creation of a task in windows 7/8 that upon regular intervals deletes some prefetch files in the windows prefetch directory. This was my method that I used to solve my flash player crashes in Firefox and have used it successfully since mid 2013. I have created a shareable folder with some automated scripts, a readme file, and an undo bat file (to remove my scripts) to assist in the proper creation of the task, and the necessary files to perform the deletion of the 3 prefetch files. There are two exe for this, both do the same thing. One is created in WINRAR SFX EXE and the other in AUTOIT either will work. Those links to the complete folder will be at the bottom of my page with the Info version of it which you should read first. 

Direct links to first (winrar exe ) and second (autoIT installer Updated 2/3/2014 ) ones for quick reference.

July 22 2016 - UPDATE:

I will not be currently supporting this method anymore. No future development.
If you are having plugin crashes, I suggest that you use the 64 bit version of Mozilla Firefox as it is much more stable than the 32 bit versions of it. Of course if you are one of the many unfortunate people with a 32 bit operating system, then maybe it is time to move into the modern day of technology. 64 bit systems have been around for over 7 years, and started to become popular after the windows 7 release in 2009. 

August 16 2014 - UPDATE:

1) 64 bit version update ONLY 1.4 here ( its already checked, hit the download button at the top). I will only be programming for 64 bit windows only going forward. The code has been added on github. the link is a few lines down in the highlighted section
2) I added some logic in the installer to create a folder structure withing the 'programdata/scripts' folder as i will be using the scripts folder for more projects
3) Added some conditional if statements into the installer to verify the install of the files and task 
4) Changed the xml file to reflect the changes in 1 above.


-------------------------------------------------------------------------------------------
 September 14th  2014 - UPDATE:

This will most likely be my last update in this series as I found a simply way to do this without creating a windows task to run this every 5 minutes, and it was so simple to do.

1) 64 bit version 2.0 only. 
2) This is an exe that you double click, or place in the windows start up folder. This will delete prefetch files as they are created; well every 30 seconds. This is a low resource exe and should not hinder your CPU.
3) will show as a red cross in the system tray. 

This is based off the actual exe that does the deleting of the prefetch files in my original iteration, with the program running in a infinite loop and using ' IF THEN ' statements to confirm the existence of said files and if so deleting them.

The files in the prefetch that are deleted are: 
1)PLUGIN-CONTAINER*.pf
2)flashpl*.pf
3)firefox*.pf
4)FLASHPLAYERUPDATESERVICE*.pf
5)PLUGIN-HANG*.pf
6)SILVERLIGHT*.pf

The download for the V2.0 file is here. Simply click the download button at the top as it is already checked for you.

December 27 2014 UPDATE: 

To those of you who would like to test this out in a bat file format, i created a BAT file so YOU can see the code as I get harassment from Mozilla Forum moderators about my creative thinking and refuse to even consider these solutions, let alone test them. Talk about incompetence!  Once or IF you n't want to see the CMD window all the time, you can grab the exe, or the source code and compile it yourself if you as paranoid as they are. 

Feel free to to test/submit any of my code at https://www.virustotal.com/ or wherever to really see if it is malicious

Download the BAT file here

June 12 2015 UPDATE: 

Updated the Auto Delete version to 2.5 to include less CPU usage by about 30%, the icon in the system try will display green if it has not deleted anything, and will turn to a red cross if something was deleted. NO tool tip. Removed the pause/exit script if you click on it and put an about/exit instead.

Version 2.5 can be found here

STEP BY STEP:

1) go to this page: 

Flash clean up and re-install

2) Read it, and determine which method you choose to use

3) You can use the exe file listed in the September update above or the BAT file in the most recent update.

4) Simply double click and run 

THIS DOES NOT INSTALL A WINDOWS TASK AS THE OLDER VERSIONS DID. 

You can stop it anytime by going to the system tray clicking on the red cross icon, and choose Exit. 
NOTE: the script will pause once you click it, and you have to hit pause again to get it to stop flashing ' pause '. 

I will put up another version with a 'hot key set ' to stop it as well in the near future.


The code can be found here

=================================================================




IMPORTANT NOTE: IF you use full screen gaming, then you must use the second link ( right above this sentense) for the one written in AUTOIT, as a compiled exe does the deletions. as you will be booted from fullscreen mode b/c of the .vbs script that does the deletions in the first link. 

This Will also not work on computers attached to a domain. it will error out 
The version V2.0 will work as it does not create a task.


The code for all the AutoBeta installer and associated files is located here

It is important to note, that now the source code is available I will be only making updates to the 2FireFox-Flash-Fix(x86)_autoBeta installers. 
The 1Firefox_1Flash_FIX(x86) version will remain available but any additions or code modifications will not be done to it.

I would like to point out that a thread was started called:

"Proposed new solution to some FlashPlayer problems”

In the Mozilla forums which involved contributors and moderators. Needless to say the moderators and contributors refused to do any testing of my proposed solution. As the vast majority of users want a click and fix solution, and do not want to sit and fiddle with code, and do things they cannot understand because they are not computer literate. I offer at the bottom of page a few links to Mozilla forums where proof of my methods can resolve these issues.

Flash player protected mode: Automated script to disable protected mode for flash player

Disable plugin container in an attempt to resolve the flash player crashes if clearing prefetch files do not work.(Mozilla recently broke this method of disabling the plugin-container)


I would like to give a special thanks to the following Mozilla forum members for assisting me in confirming my testing and willing to try my methods:

7246291


mgenoves


Sonoko


Datamaniak


Also thanks to Adobe forum member Troudhyl. Even though either method or various other methods we tried didn’t work for his flash player crash upon startup of some links, this helped me to confirm what it didn’t resolve for sure.

Below is the link for the folder with the proposed fixes, and please be sure to read the info.txt file prior please. You will need winrar to open the archive files. http://www.rarlab.com/


YouTube tutorial

Please note that i can provide limited technical support for these. There is the info word document available to read. I tried to make this a simple as possible. Please be sure to read these.

Best Regards to all


LINK TO FOLDER FOR FIXES 

Here are some links to my proven cases of persons who have tried my methods:

https://support.mozilla.org/en-US/questions/981705

https://support.mozilla.org/en-US/questions/981332

https://support.mozilla.org/en-US/questions/980349

 

NEVER INSTALL FLASH PLAYER MANUALLY AGAIN

Be sure to Check out my other post for complete uninstall, clean up of all flash files, and re-install from a script. http://adobeflashcleanup.blogspot.com/