All,

I keep a static file and edit it after CM12 has "installed" it - using 
PowerShell:
$FFPath = "${env:ProgramFiles(x86)}\Mozilla Firefox"
(Get-Content -Path "$FFPath\example.cfg").Replace('defaultPref("network.proxy. 
autoconfig_url", "http://proxy.example.com);'," 
defaultPref(`"network.proxy.autoconfig_url`", 
`"http://proxy-new.example.com`";);") | Out-File "$FFPath\example.cfg" -Encoding 
default

On an x64 OS in the above example... -Encoding default seems required to keep 
the file UTF-8 which does work in FF...

Agree that an answer where the autoconfig could have some smarts in JavaScript 
code would be even better!

Thanks,
Ryan Kasper
Lockheed Martin Software Distribution
[email protected]

-----Original Message-----
From: Enterprise [mailto:[email protected]] On Behalf Of James 
Pearson
Sent: Tuesday, August 1, 2017 5:18 AM
To: Alex, Nicole L <[email protected]>; [email protected]
Subject: EXTERNAL: Re: [Mozilla Enterprise] AutoConfig Javascript

Alex, Nicole L wrote:
>
> I'm trying to avoid creating two different AutoConfig configurations 
> for our environment that the only difference is the proxy settings.
> Has anyone used the ability to run a JavaScript after CCK2 to do
> these kinds of changes?   If so, has there been any issues or
> conflicts with resetting a preference?

Without knowing exactly what proxy settings you are tying to set, if it is to 
select different proxy servers based, say, on client address, it may be better 
to use proxy autoconfig file/server
(https://en.wikipedia.org/wiki/Proxy_auto-config)

That said, it is perfectly possible to do different config settings in a 
autoconfig cfg file - on our Linux install, we set various preferences based on 
environment variables that are are defined in the user's shell
- and this is done outside any settings that are made by the CCK2 part of our 
autoconfig file

I believe it is also possible to access registry settings in a Windows 
environment from the autoconfig file

James Pearson



_______________________________________________
Enterprise mailing list
[email protected]
https://mail.mozilla.org/listinfo/enterprise

To unsubscribe from this list, please visit 
https://mail.mozilla.org/listinfo/enterprise or send an email to 
[email protected] with a subject of "unsubscribe"
_______________________________________________
Enterprise mailing list
[email protected]
https://mail.mozilla.org/listinfo/enterprise

To unsubscribe from this list, please visit 
https://mail.mozilla.org/listinfo/enterprise or send an email to 
[email protected] with a subject of "unsubscribe"

Reply via email to