+ Post New Thread
Results 1 to 3 of 3
Windows Thread, Set firefox proxy via login script in Technical; Does anyone know a way to set the firefox proxy via a login script? I cant do it by GPO ...
  1. #1

    Join Date
    Jan 2007
    Location
    Durham, UK
    Posts
    328
    Thank Post
    33
    Thanked 17 Times in 12 Posts
    Rep Power
    20

    Set firefox proxy via login script

    Does anyone know a way to set the firefox proxy via a login script? I cant do it by GPO

    Thanks
    Jack Dunn

  2. #2

    mattx's Avatar
    Join Date
    Jan 2007
    Posts
    9,236
    Thank Post
    1,057
    Thanked 1,067 Times in 624 Posts
    Rep Power
    740

    Re: Set firefox proxy via login script

    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 - mmarsh@st-johns.org.uk
    ; 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\Cac he')
    DirCreate(EnvGet("USERPROFILE") & '\Application Data\Mozilla\Firefox\Profiles\60wyitij.default\Chr ome')
    DirCreate(EnvGet("USERPROFILE") & '\Application Data\Mozilla\Firefox\Profiles\60wyitij.default\ext ensions')
    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\Cac he\')
    FileCopy('\\stjohns01\apps\update\Mozilla\Firefox\ Profiles\60wyitij.default\Chrome\*.*', EnvGet("USERPROFILE") & '\Application Data\Mozilla\Firefox\Profiles\60wyitij.default\Chr ome\')
    FileCopy('\\stjohns01\apps\update\Mozilla\Firefox\ Profiles\60wyitij.default\extensions\*.*', EnvGet("USERPROFILE") & '\Application Data\Mozilla\Firefox\Profiles\60wyitij.default\ext ensions\')
    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\Cac he')
    DirCreate('N:\Application Data\Mozilla\Firefox\Profiles\60wyitij.default\Chr ome')
    DirCreate('N:\Application Data\Mozilla\Firefox\Profiles\60wyitij.default\ext ensions')
    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\Cac he\')
    FileCopy('\\stjohns01\apps\update\Mozilla\Firefox\ Profiles\60wyitij.default\Chrome\*.*', 'N:\Application Data\Mozilla\Firefox\Profiles\60wyitij.default\Chr ome\')
    FileCopy('\\stjohns01\apps\update\Mozilla\Firefox\ Profiles\60wyitij.default\extensions\*.*', 'N:\Application Data\Mozilla\Firefox\Profiles\60wyitij.default\ext ensions\')
    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

  3. #3

    Join Date
    Nov 2009
    Posts
    8
    Thank Post
    0
    Thanked 0 Times in 0 Posts
    Rep Power
    0
    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.

SHARE:
+ Post New Thread

Similar Threads

  1. Installing/Copying Fonts from Login Script
    By mattpant in forum Windows
    Replies: 10
    Last Post: 11th August 2011, 09:24 PM
  2. Printers disappearing after login script
    By gshaw in forum Windows
    Replies: 11
    Last Post: 10th June 2009, 06:47 PM
  3. IE crashing on proxy login
    By Pumaedition in forum Windows
    Replies: 0
    Last Post: 6th December 2007, 11:40 AM
  4. Replies: 4
    Last Post: 23rd November 2006, 09:33 PM
  5. Login script problem
    By SpuffMonkey in forum Windows
    Replies: 55
    Last Post: 4th February 2006, 09:27 PM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •