[wpkg-users] Firefox 3.6.8 set homepage check issue- Resolved

Nick Elmendorf nelmendorf at slcpl.org
Thu Jan 20 02:18:53 CET 2011


I just wanted to say Johns solution worked below. You need to create both the policies.js and the mozilla.cfg files. I used notepad and then renamed the files and dropped them into the right locations and it worked fine. My full WPKG script (which is based on Johns) is the below code. Also included is our email chain. If you see that ROT13 business ignore it, stick to what John says, don't complicate it and your good to go. Thanks for your time. 

<?xml version="1.0" encoding="UTF-8"?>

<packages>
 <package 
        id="firefox_homepage"
        name="firefox_homepage"
        revision="201101190005"
        reboot="false"
        priority="54">
       		
		<!--Check Command -->
		<check type="file" condition="exists" path="C:\Program Files\Mozilla Firefox\defaults\pref\policies.js" />	
		<check type="file" condition="exists" path="C:\Program Files\Mozilla Firefox\mozilla.cfg" />
				
		<!-- Install Commands -->
		<install cmd='%COMSPEC% /c copy /Y "%SOFTWARE%\mozilla\firefox\3.6.8\policies.js" "C:\Program Files\Mozilla Firefox\defaults\pref\"' />
	 	<install cmd='%COMSPEC% /c copy /Y "%SOFTWARE%\mozilla\firefox\3.6.8\mozilla.cfg" "C:\Program Files\Mozilla Firefox\"' />
		
		<!--Upgrade Commands -->
		<upgrade cmd='%COMSPEC% /c copy /Y "%SOFTWARE%\mozilla\firefox\3.6.8\policies.js" "C:\Program Files\Mozilla Firefox\defaults\pref\"' />
	 	<upgrade cmd='%COMSPEC% /c copy /Y "%SOFTWARE%\mozilla\firefox\3.6.8\mozilla.cfg" "C:\Program Files\Mozilla Firefox\"' />
		
	</package>

</packages>

Nick Elmendorf
Senior Information Technology Specialist



----- Forwarded Message -----
From: "Nick Elmendorf" <nelmendorf at slcpl.org>
To: "John Danks" <john.danks at gmail.com>
Sent: Wednesday, January 19, 2011 6:15:19 PM GMT -07:00 US/Canada Mountain
Subject: Re: [wpkg-users] Firefox 3.6.8 set homepage check issue

It is grayed out. Thanks for your help again. Have a good evening.

Nick Elmendorf
Senior Information Technology Specialist




----- Original Message -----
From: "John Danks" <john.danks at gmail.com>
To: "Nick Elmendorf" <nelmendorf at slcpl.org>
Sent: Wednesday, January 19, 2011 5:49:37 PM GMT -07:00 US/Canada Mountain
Subject: Re: [wpkg-users] Firefox 3.6.8 set homepage check issue

If you're using lockPref correctly then the field for home page in
Tools / Options should be disabled (grayed out).

On Wed, Jan 19, 2011 at 3:58 PM, Nick Elmendorf <nelmendorf at slcpl.org> wrote:
> John,
>
> That seemed to do the trick. I made the files, put them on the server and used a test computer as three different unique log ins and it worked. Thanks for the help. I notice that in options it will allow people to change webpages, but every time firefox is reopened it reverts back to the fixed website. It will work for 99% of my users. For the one who does something weird I can also exclude them from the host file for that WPKG. Once again thanks.
>
> Nick Elmendorf
> Senior Information Technology Specialist
>
>
>
>
> ----- Original Message -----
> From: "John Danks" <john.danks at gmail.com>
> To: "Nick Elmendorf" <nelmendorf at slcpl.org>
> Sent: Wednesday, January 19, 2011 4:14:09 PM GMT -07:00 US/Canada Mountain
> Subject: Re: [wpkg-users] Firefox 3.6.8 set homepage check issue
>
> If you look at the install commands you can see where it copies each
> file. The policies.js I included uses the obscure_value = 0 setting to
> avoid the encoding, and points to the config file to use, in this case
> I chose the name mozilla.cfg.
>
> On Wed, Jan 19, 2011 at 2:47 PM, Nick Elmendorf <nelmendorf at slcpl.org> wrote:
>> Hi John,
>>
>> Thanks for the reply. Do you need to do anything special with either the policies.js or mozilla.cfg file? I researched online and found that you need to manually create the mozilla.cfg file and place it in the same folder as the mozilla.exe folder, is that what you did? I also noticed some crazy thing in regards to mozilla.cfg that you had to encode the file using rot13, did you do that as well or did you find a way to do it that did not involve that? Thanks for your help and your time.
>>
>> Nick Elmendorf
>> Senior Information Technology Specialist
>>
>> ----- Original Message -----
>> From: "John Danks" <john.danks at gmail.com>
>> To: "Nick Elmendorf" <nelmendorf at slcpl.org>
>> Sent: Wednesday, January 19, 2011 2:11:26 PM GMT -07:00 US/Canada Mountain
>> Subject: Re: [wpkg-users] Firefox 3.6.8 set homepage check issue
>>
>> You might have better luck with policies.js and lockPref().
>>
>> My regular firefox package includes these install commands:
>>
>> <install cmd='%COMSPEC% /c copy /y
>> "%SOFTWARE%\apps\firefox\policies.js" "%PROGRAMFILES%\Mozilla
>> Firefox\defaults\pref\"' />
>> <install cmd='%COMSPEC% /c copy /y
>> "%SOFTWARE%\apps\firefox\mozilla.cfg" "%PROGRAMFILES%\Mozilla
>> Firefox\"' />
>>
>> policies.js:
>>
>> pref("general.config.obscure_value", 0);
>> pref("general.config.filename", "mozilla.cfg");
>>
>> mozilla.cfg:
>>
>> //
>> lockPref("browser.startup.homepage_override.mstone", "ignore");
>> lockPref("browser.shell.checkDefaultBrowser", false);
>> lockPref("app.update.enabled", false);
>> lockPref("browser.startup.homepage", "http://example.com/");
>> lockPref("browser.startup.page", 1);
>> lockPref("network.proxy.type", 0);
>>
>> On Wed, Jan 19, 2011 at 12:34 PM, Nick Elmendorf <nelmendorf at slcpl.org> wrote:
>>> Hello,
>>>
>>> I am currently trying to write a program which changes the firefox 3.6.8 homepage from default to my company's internal page. The problem I'm having is I can't get a check to work.
>>>
>>> I have a different WPKG XML that first installs Firefox 3.6.8 normally. Then I have a second WPKG, titled "firefox_homepage.xml" that does the following:
>>>
>>> "firefox_homepage.xml"
>>>
>>> "<?xml version="1.0" encoding="UTF-8"?>
>>>
>>> <packages>
>>>  <package
>>>        id="firefox_homepage"
>>>        name="firefox_homepage"
>>>        revision="201101190002"
>>>        reboot="false"
>>>        priority="50">
>>>
>>>                <!--Check Command -->
>>>
>>>                <!-- Install Commands -->
>>>                <install cmd='%COMSPEC% /c copy /Y "%SOFTWARE%\mozilla\firefox\3.6.8\browserconfig.properties" "C:\Program Files\Mozilla Firefox"' />
>>>
>>>                <!--Upgrade Commands -->
>>>                <upgrade cmd='%COMSPEC% /c copy /Y "%SOFTWARE%\mozilla\firefox\3.6.8\browserconfig.properties" "C:\Program Files\Mozilla Firefox"' />
>>>
>>>        </package>
>>>
>>> </packages>
>>>
>>> As for that bit about browserconfig.properties, if you open yours up is says some generic firefox page. I edited it using notepad+ and changed just the webpage like so:
>>>
>>> "browserconfig.properties"
>>>
>>> "browser.startup.homepage=http://mycompanywebpage.com
>>> browser.startup.homepage_reset=http://mycompanywebpage.com"
>>>
>>> I have tested this lightly and it seems to work (at least on one computer). The issue is the following. We have stations set up that have users log on, EITHER with a department logon OR with a unique user logon. I'm not so concerned about department logons, they seem to work, but I need firefox to change the homepage to mycompanypage.com each time a unique staff ID logs onto any given computer. I.E. if I log onto 4 different computers I would need "firefox_homepage" to run 4 different times. The issue is, how to I write a check into the program so if I log into computer X it sees that "firefox_homepage" has run but then I go log into computer Z and it sees that it still needs to run "firefox_homepage".
>>>
>>> I had thought of using a install/upgrade command to put a little notepad file copied from a network drive to the users profile folder on any given computer, but I can't seem to figure that out (it still very well may work, but I do not know). Can anyone think of a solution that could use a check knowing that I might log into any one of say ten computers and it needs to run for not only me, but every user that follows on not only one, but every computer in the network?
>>>
>>> Any help would be most appreciated.
>>>
>>> Nick Elmendorf
>>> Senior Information Technology Specialist
>>> -------------------------------------------------------------------------
>>> wpkg-users mailing list archives >> http://lists.wpkg.org/pipermail/wpkg-users/
>>> _______________________________________________
>>> wpkg-users mailing list
>>> wpkg-users at lists.wpkg.org
>>> http://lists.wpkg.org/mailman/listinfo/wpkg-users
>>>
>>
>



More information about the wpkg-users mailing list