Jackd Posted September 26, 2007 Posted September 26, 2007 Does anyone know a way to set the firefox proxy via a login script? I cant do it by GPO Thanks Jack Dunn
mattx Posted September 26, 2007 Posted September 26, 2007 This is something I knocked up a few years back. We use mandatory profiles hence the length of the script, also note its not a logon script, its a script thats run before firefox launches - a pre launcher if you like. The details of the proxy etc are held in prefs.js. You will have to taylor it to your requirements as you can see from the script its a bespoke script for our network, hopefully it may give you a few pointers.... [ note: The profiles.ini file is a flag file ] ; AutoIt Version: 3 ; Language: English ; Platform: WinXP ; Author: Matt Marsh - [email protected] ; Script Function: Copies over Prefs Java Script file for firefox with correct proxy settings ; for both local and re-directed application data folders. If FileExists(EnvGet("USERPROFILE") & '\Application Data\Mozilla\Firefox\Profiles.ini') Then FileDelete(EnvGet("USERPROFILE") & '\Application Data\Mozilla\Firefox\Prefs.js') FileCopy('\\stjohns01\apps\update\Prefs.js', EnvGet("USERPROFILE") & '\Application Data\Mozilla\Firefox\') Else DirCreate(EnvGet("USERPROFILE") & '\Application Data\Mozilla') DirCreate(EnvGet("USERPROFILE") & '\Application Data\Mozilla\Firefox') DirCreate(EnvGet("USERPROFILE") & '\Application Data\Mozilla\Firefox\Profiles') DirCreate(EnvGet("USERPROFILE") & '\Application Data\Mozilla\Firefox\Profiles\60wyitij.default') DirCreate(EnvGet("USERPROFILE") & '\Application Data\Mozilla\Firefox\Profiles\60wyitij.default\Cache') DirCreate(EnvGet("USERPROFILE") & '\Application Data\Mozilla\Firefox\Profiles\60wyitij.default\Chrome') DirCreate(EnvGet("USERPROFILE") & '\Application Data\Mozilla\Firefox\Profiles\60wyitij.default\extensions') FileCopy('\\stjohns01\apps\update\Mozilla\*.*', EnvGet("USERPROFILE") & '\Application Data\Mozilla\') FileCopy('\\stjohns01\apps\update\Mozilla\Firefox\*.*', EnvGet("USERPROFILE") & '\Application Data\Mozilla\Firefox\') FileCopy('\\stjohns01\apps\update\Mozilla\Firefox\Profiles\*.*', EnvGet("USERPROFILE") & '\Application Data\Mozilla\Firefox\Profiles\') FileCopy('\\stjohns01\apps\update\Mozilla\Firefox\Profiles\60wyitij.default\*.*', EnvGet("USERPROFILE") & '\Application Data\Mozilla\Firefox\Profiles\60wyitij.default\') FileCopy('\\stjohns01\apps\update\Mozilla\Firefox\Profiles\60wyitij.default\Cache\*.*', EnvGet("USERPROFILE") & '\Application Data\Mozilla\Firefox\Profiles\60wyitij.default\Cache\') FileCopy('\\stjohns01\apps\update\Mozilla\Firefox\Profiles\60wyitij.default\Chrome\*.*', EnvGet("USERPROFILE") & '\Application Data\Mozilla\Firefox\Profiles\60wyitij.default\Chrome\') FileCopy('\\stjohns01\apps\update\Mozilla\Firefox\Profiles\60wyitij.default\extensions\*.*', EnvGet("USERPROFILE") & '\Application Data\Mozilla\Firefox\Profiles\60wyitij.default\extensions\') EndIf If Not FileExists('N:\Application Data\Mozilla\Firefox\Profiles.ini') Then DirCreate('N:\Application Data\Mozilla') DirCreate('N:\Application Data\Mozilla\Firefox') DirCreate('N:\Application Data\Mozilla\Firefox\Profiles') DirCreate('N:\Application Data\Mozilla\Firefox\Profiles\60wyitij.default') DirCreate('N:\Application Data\Mozilla\Firefox\Profiles\60wyitij.default\Cache') DirCreate('N:\Application Data\Mozilla\Firefox\Profiles\60wyitij.default\Chrome') DirCreate('N:\Application Data\Mozilla\Firefox\Profiles\60wyitij.default\extensions') FileCopy('\\stjohns01\apps\update\Mozilla\*.*', 'N:\Application Data\Mozilla\') FileCopy('\\stjohns01\apps\update\Mozilla\Firefox\*.*', 'N:\Application Data\Mozilla\Firefox\') FileCopy('\\stjohns01\apps\update\Mozilla\Firefox\Profiles\*.*', 'N:\Application Data\Mozilla\Firefox\Profiles\') FileCopy('\\stjohns01\apps\update\Mozilla\Firefox\Profiles\60wyitij.default\*.*', 'N:\Application Data\Mozilla\Firefox\Profiles\60wyitij.default\') FileCopy('\\stjohns01\apps\update\Mozilla\Firefox\Profiles\60wyitij.default\Cache\*.*', 'N:\Application Data\Mozilla\Firefox\Profiles\60wyitij.default\Cache\') FileCopy('\\stjohns01\apps\update\Mozilla\Firefox\Profiles\60wyitij.default\Chrome\*.*', 'N:\Application Data\Mozilla\Firefox\Profiles\60wyitij.default\Chrome\') FileCopy('\\stjohns01\apps\update\Mozilla\Firefox\Profiles\60wyitij.default\extensions\*.*', 'N:\Application Data\Mozilla\Firefox\Profiles\60wyitij.default\extensions\') EndIf FileCopy('\\stjohns01\apps\update\Prefs.js', 'N:\Application Data\Mozilla\Firefox\' ,1) FileCopy('\\stjohns01\apps\update\Prefs.js', 'N:\Application Data\Mozilla\Firefox\Profiles\60wyitij.default\' ,1) Run('c:\Program Files\Mozilla Firefox v1\firefox.exe') Exit
rinzwind Posted December 24, 2009 Posted December 24, 2009 Reply to old topic, I know... I created a general tool that is perfectly capable of changing Firefox profile settings. You can download it freely from Tools | WizardSoft - Systeembeheer voor MKB. It's called editme.exe . Example included! Hope it helps anyone whose looking for something similar.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now