Setting Adobe Reader in policies.json

138 views
Skip to first unread message

Thane K. Sherrington

unread,
Nov 30, 2021, 3:03:43 PM11/30/21
to Mozilla.org
Can I setup default handlers in the policies.json?  From reading, it looks like I can do something like:

{
    "policies": {
        "extensions": {
            "pdf": {
                "action": "useHelperApp",
                "ask": false,
                "handlers": [{
                    "name": "Adobe Acrobat",
                    "path": "C:\Program Files (x86)\Adobe\Acrobat Reader DC\Reader"
                }]
            }
        }
    }
}

But that doesn't seem to work, at least not in my larger policies.json that looks like this:

{
    "policies": {
        "ShowHomeButton": true,
        "DisableBuiltinPDFViewer": true,
        "DisplayBookmarksToolbar": true,
        "DisplayMenuBar": "always",
        "PSFjs": {
            "Enabled": false
            },
        "NetworkPrediction": true,
        "Proxy": {
            "AutoLogin": true,
            "Mode": "none",
            "SOCKSVersion": 4,
            "UseHTTPProxyForAllProtocols": true,
            "UseProxyForDNS": false
            },
        "SearchEngines": {
            "Default": "Google",
            "PreventInstalls": true
        },
        "extensions": {
            "pdf": {
                "action": "useHelperApp",
                "ask": false,
                "handlers": [{
                    "name": "Adobe Acrobat",
                    "path": "C:\Program Files (x86)\Adobe\Acrobat Reader DC\Reader"
                }]
            }
        }
    }
}

Any advice would be appreciated.

--
Thane K. Sherrington

Computer Connection, Ltd. ...taking the mystery out of computers since 1982.
Winner of the 2012 Ian Spencer - Excellence in Business Award
Thanks for making us the Reader's Choice Best Computer Store in 2016, 2017, 2018 and 2019!
95 College St., Antigonish,
NS B2G 1X6
902-863-3361 (phone)
902-863-2580 (fax)
th...@computerconnectionltd.com

Mike Kaply

unread,
Nov 30, 2021, 5:01:51 PM11/30/21
to Thane K. Sherrington, Mozilla.org
The extensions part should be under a Handlers policy:

{
  "policies": {
    "Handlers": {
      "extensions": {
        "pdf": {
          "action": "useHelperApp",
          "ask": false,
          "handlers": [{
            "name": "Adobe Acrobat",
            "path": "/usr/bin/acroread"
          }]
        }
      }
    }
  }
}
You also might need to escape those slashes.

Mike


--
You received this message because you are subscribed to the Google Groups "enter...@mozilla.org" group.
To unsubscribe from this group and stop receiving emails from it, send an email to enterprise+...@mozilla.org.
To view this discussion on the web visit https://groups.google.com/a/mozilla.org/d/msgid/enterprise/a109a464-e231-0dbc-3692-92f40cb149db%40computerconnectionltd.com.

Thane K. Sherrington

unread,
Dec 2, 2021, 9:00:45 AM12/2/21
to enter...@mozilla.org
Yes, it appears the slashes need to be escaped, but it's working for me now.
Is there a way to set Firefox to just open an extension with whatever Windows has as the default?  That would save worrying about the path.

For anyone else doing this, the block I ended up with was:

 
       "Handlers": {
            "extensions": {
                "pdf": {
                    "action": "useHelperApp",
                    "ask": false,
                    "handlers": [{
                        "name": "Adobe Acrobat",
                        "path": "C:\\Program Files (x86)\\Adobe\\Acrobat Reader DC\\Reader\\AcroRd32.exe"
                    }]

                }
            }



Thane K. Sherrington

Computer Connection, Ltd. ...taking the mystery out of computers since 1982.
Winner of the 2012 Ian Spencer - Excellence in Business Award
Thanks for making us the Reader's Choice Best Computer Store in 2016, 2017, 2018 and 2019!
95 College St., Antigonish,
NS B2G 1X6
902-863-3361 (phone)
902-863-2580 (fax)
th...@computerconnectionltd.com

Mike Kaply

unread,
Dec 2, 2021, 9:09:10 AM12/2/21
to Thane K. Sherrington, Mozilla.org
Try setting the action to useSystemDefault.

Mike

Matjaz Pavel

unread,
Jan 12, 2022, 3:07:48 PM1/12/22
to Mike Kaply, Mozilla.org
Hello!

I have noticed in the latest Firefox that I can't automatically deploy AdBlock-Plus extension for new FF profiles. I'm using policies.json.

This has been working for quite some time but not with FF 96 (authentication, homepage and override... values are dummy).

{
  "policies": {
    "Authentication": {
      "Delegated": [".home.lan", ".domain.com"],
      "NTLM": [".home.lan", ".domain.com"],
      "SPNEGO": [".home.lan", ".domain.com"],
      "AllowNonFQDN": {
        "NTLM": true,
        "SPNEGO": true
      }
    },
    "Certificates": {
      "ImportEnterpriseRoots": true
    },
    "Homepage": {
      "StartPage": "homepage",
      "URL": "https://www.domain.xy"
    },
    "OverrideFirstRunPage": "https://www.domain.xy",
    "OverridePostUpdatePage": "https://www.domain.xy",
    "SearchBar": "separate",
    "DisplayMenuBar": "default-on",
    "DisableTelemetry": true,
    "ShowHomeButton": true,
    "Proxy": {
      "AutoLogin": true,
      "Locked": true,
      "Mode": "autoDetect",
      "Passthrough": "<local>, 10.0.0.0/8",

      "SOCKSVersion": 4,
      "UseHTTPProxyForAllProtocols": true,
      "UseProxyForDNS": false
    },
    "ExtensionSettings": {
      "*": {
        "blocked_install_message": "Not allowed!",
        "install_sources": ["about:addons","https://addons.mozilla.org/"],
        "installation_mode": "allowed",
        "allowed_types": ["extension", "theme", "dictionary", "langpack" ]
      },
      "{d10d0bf8-f5b5-c8b4-a8b2-2b9879e08c5d}": {
         "install_url": "https://addons.mozilla.org/firefox/downloads/latest/adblock-plus/latest.xpi",
         "installation_mode": "normal_installed"
      }
    }
  }
}

When I start Firefox with a new profile, all other settings (homepage, authentication, certificates) are applied.

Any idea how can I solve this issue?


Kind regards,
Matjaz Pavel

René Raphael

unread,
Jan 12, 2022, 4:58:48 PM1/12/22
to Matjaz Pavel, Mike Kaply, Mozilla.org
--
You received this message because you are subscribed to the Google Groups "enter...@mozilla.org" group.
To unsubscribe from this group and stop receiving emails from it, send an email to enterprise+...@mozilla.org.
--
Raphael.r.m

Mike Kaply

unread,
Jan 12, 2022, 8:27:22 PM1/12/22
to Mozilla.org
This statement is incorrect and I'm not sure how it worked before:

"allowed_types": ["extension", "theme", "dictionary", "langpack"]

The correct type is locale not langpack.

You actually don't need this line at all since you are allowing all types.

Mike
Reply all
Reply to author
Forward
0 new messages