Jump to content

Unbelievable problem with Firefox installation


midiboy

Recommended Posts

Hi guys,

after working for 2 days and more than 14 hours on this I am really desperate. I read quite a lot about Firefox unattended installations by Simon and others but since I wanted complete control over what gets installed and I am also using a German Firefox installation, I decided to make my own installation instead of using one of the many setups offered in this forum.

I managed to get where I wanted, almost ... but this last problem is not going away and driving me mad by now. :realmad::realmad::realmad:

OK, here´s the deal:

1. I am using Mozilla setup program to install firefox.

2. I am copying the plugin folder from an existing folder onto the plugins folder in Firefox directory.

3. I am copying a bookmarks.html and a prefs.js file into the defaults\profile directory.

Next, I wanted to install a few extensions globally but I soon found out, that no matter what I tried, firefox would start the IE Import Wizard whenever it would run the first time, making an unattended installation of firefox extensions impossible.

I read threads here about turning the IE Wizard off but not one of the suggested workarounds worked. Also, I would actually like to keep the wizard pop up when a USER runs Firefox for the first time but NOT while the Administrator is installing plugins. But this is seemingly impossible.

So I then came up with a workaround:

I figured that Firefox will only pop up that wizard if no user profile existed in %APPDATA% so I came up with the idea to copy an old Mozilla folder containing a dummy profile into the %APPDATA% directory before installing the extensions.

No comes the big problem ...

The code to copy the dummy profile works perfectly if I try it on my main machine´s user account but it fails miserably during an unattended installation on a virtual machine.

Of course if the dummy profile is not copied over, the extensions will not install without popping up the IE Import wizard.

I have tried at least 20 different versions of the code, I checked while the code was executed if the folder %APPDATA% existed at that time, I even went as far as to make a "Mozilla" directory inside the %APPDATA% folder before copying ... to no avail.

What happens is, the Mozilla folder is always copied to C:\ instead. However, if I open a CMD during the Runonceex process and check if the variable %APPDATA% is recognized, I correctly get directed to the corresponding folder (C:\Dokumente und Einstellungen\Administrator\Anwendungsdaten)

This drives me mad !!! I don´t understand why Windows won´t copy the folder into the APPDATA folder at that point in time while it will work perfectly later on when the process is finished.

Any ideas ?? I sure hope so ... :unsure:

Here´s the complete code ...

REG ADD %KEY%\022 /VE /D "Mozilla Firefox 1.0" /f
REG ADD %KEY%\022 /V 1 /D "CMD /C md \"%APPDATA%\Mozilla\"" /f
REG ADD %KEY%\022 /V 2 /D "%CDROM%\Setup\Firefox\setup.exe -ira" /f
REG ADD %KEY%\022 /V 3 /D "CMD /C xcopy %CDROM%\SETUP\Firefox\dummy\Mozilla\*.* \"%APPDATA%\Mozilla\\" /S /E /H /Y" /f
REG ADD %KEY%\022 /V 4 /D "CMD /C xcopy %CDROM%\SETUP\Firefox\plugins\*.* \"%PROGRAMFILES%\Mozilla Firefox\plugins\\" /S /E /H /Y" /f
REG ADD %KEY%\022 /V 5 /D "CMD /C xcopy %CDROM%\SETUP\Firefox\profile\*.* \"%PROGRAMFILES%\Mozilla Firefox\defaults\profile\\" /S /E /H /Y " /f
REG ADD %KEY%\022 /V 6 /D "CMD /C %CDROM%\SETUP\Firefox\default.cmd" /f

REG ADD %KEY%\024 /VE /D "Firefox Extensions" /f
REG ADD %KEY%\024 /V 1 /D "\"%PROGRAMFILES%\Mozilla Firefox\firefox.exe\" -install-global-extension %CDROM%\SETUP\Firefox\xpi\auto_copy-0.3-fx.xpi" /f
REG ADD %KEY%\024 /V 2 /D "\"%PROGRAMFILES%\Mozilla Firefox\firefox.exe\" -install-global-extension %CDROM%\SETUP\Firefox\xpi\disable_targets_for_downloads-0.8-fx.xpi" /f
REG ADD %KEY%\024 /V 3 /D "\"%PROGRAMFILES%\Mozilla Firefox\firefox.exe\" -install-global-extension %CDROM%\SETUP\Firefox\xpi\favorites_converter_(export)-1.0.1-fx.xpi" /f
REG ADD %KEY%\024 /V 4 /D "\"%PROGRAMFILES%\Mozilla Firefox\firefox.exe\" -install-global-extension %CDROM%\SETUP\Firefox\xpi\flashgot-0.5.5-fx+mz.xpi" /f
REG ADD %KEY%\024 /V 5 /D "\"%PROGRAMFILES%\Mozilla Firefox\firefox.exe\" -install-global-extension %CDROM%\SETUP\Firefox\xpi\ieview-0.84-fx-windows.xpi" /f
REG ADD %KEY%\024 /V 6 /D "\"%PROGRAMFILES%\Mozilla Firefox\firefox.exe\" -install-global-extension %CDROM%\SETUP\Firefox\xpi\TargetAlert.xpi" /f

Bye,

Alex

Link to comment
Share on other sites


This is what I do:

-Install Firefox, extensions and favourite themes.

-Configure it the way you want.

-Backup following directories:

C:\Program Files\Mozilla Firefox\

C:\Documents and Settings\"Owner"\Application Data\Mozilla\

Copy these directories to your Unattended CD.

Or make a sfx to save space.

Hope this helps. B)

Link to comment
Share on other sites

Guys,

thanks for the help but it did not help much :rolleyes:

I did try your super easy way of doing things already but just copying the installation and user data directories over did not work with the installed extensions. They did not get initiated or something else goes wrong everytime I do this because none of my extensions will work that way.

They only work right if the extensions are installed and Firefox then creates a new user directory when a user starts Firefox for the first time.

So your suggestion did not help unfortunately.

Also ...

The installation is almost working. I just need a solution to the problem that copying the dummy user profile to the %APPDATA% folder during installation is not working correctly. An alternative solution would be a working way to turn the IE Import wizard of/on during Firefox first run.

Thanks,

Alex

Link to comment
Share on other sites

Can i make a suggestion to you.

why dont u try using this method?

"C:\program files\mozilla firefox\firefox.exe" -profile defaults\profile"

click on my signature to Firefox

here is my updated version

Your Download-Link (english): http://rapidshare.de/files-en/279801/profile.exe.html

Your Download-Link (german): http://rapidshare.de/files-de/279801/profile.exe.html

i intentionally did not make the sfx silent. do that on your own.

you wont see the changes unless u delete your

C:\Documents and Settings\USERNAME\Application Data\Mozilla

for more info read this

http://www.msfn.org/board/index.php?act=ST...210#entry231092

heck here is the method

1. if you are planning to use Simonsay's Firefox.exe and have no plans to install it to another drive or place. All you need to do is...

1. Go to start menu and click on Run. Type the following to start

Firefox using the default profile.

"C:\program files\mozilla firefox\firefox.exe" -profile defaults\profile"

2. Install any extensions and themes and customize how you want

everything to look like.

Then you can zip up this directory. User Winrar to Create a SFX

With this comment.

;The comment below contains SFX script commands

Path=C:\Program Files\Mozilla Firefox\defaults\profile
SavePath
Silent=1
Overwrite=1

If u plan to install firefox to another directory or another drive like D:\.

you will need to follow the rest of the instructions.

I only used the email as a referrence rather than a general guide. I didn't even use the SFX maker.

How do u test if your profilesfx.exe worked?

Answer:

1. Uninstall firefox,

2. Go to c:\documents_and_settings\<username>\application_data\mozilla\

3. Delete that folder

4. Reinstall simonsay's firefox.exe

5. Run your profilesfx.exe

6. Start firefox

7. A windows will appear if u want to import bookmarks

8. When firefox now opens it will have all the extensions, bookmarks, themes, and any settings.

dont forget to clear your cache, passwords, page visited, and etc. prior to use of this method.

Link to comment
Share on other sites

-Backup following directories:

C:\Program Files\Mozilla Firefox\

C:\Documents and Settings\"Owner"\Application Data\Mozilla\

@prathapml and @bucketbuster well that's the thing i would never do. if your drive and your username is not the same than your firefox profile will be totally f...!

i really preffer @Astalavista's way to ensure everything is correct ;)

Link to comment
Share on other sites

Guys,

I really appreciate your chiming in here and I really appreciate all you different Firefox installation guides but instead of suggesting totally different ways of installing firefox it would help much more if someone would help me find the problem with my way of doing things !

I don´t want to sound rude or unthankful but I did read up on most of the common installation methods used in this forum (by SimonSays or Astalavista to name just a few) but they don´t fit my needs because I DON`T want 20 extensions included that I don´t need + all the themes and extras. Also the extensions I would need were mostly not included so this does not help me.

Also, as I said in my initial post, I am using a German installation.

I see nothing wrong the way I do this. This, to me, seems like a very clean way of doing this. The application and all extensions are installed on that machine, nothing is dragged over (and possibly not initiated properly) from a previous installation and only the things I need are installed.

The ONLY (!!) problem I am having is, that when the first extension is being installed, the import wizard pops up.

This is the thing I have to get rid of, either by finding a working switch or by succeeding in copying a dummy profile that will ONLY be used while the extensions are installed (it will get deleted later on ).

instead of owner would it not be better to set it as default user?

DigeratiPrime, what are you talking about ? Could you please explain ? THANKS ! :)

Thanks,

Alex

Link to comment
Share on other sites

here is a clue.

what u put in u can remove.

if u dont want the themes and extensions i hv

MAKE one for youself.

That is why there is a guide for you to customize and make your own.

If you don't want Simonsay's plugins...

open up his package with winrar, and remove the plugins, it isnt too hard.\

no one is forcing u to use the bookmarks, extensions, themes, plugins and etc.

personally i find the plugins that simon bundled as very useful.

but to each his own.

it just means u hv to do it from scratch.... and it is going to take u a lot of effort and time. Unlike our packages... your done in about 5 to 10 mins

Link to comment
Share on other sites

@midiboy

Try this method (my post at end of the page there).

Other topics where getting rid of "import settings" wizard is discussed:

1. link

2. similar topic

3. edit the prefs.js

I think its important that the user profile's prefs.js should not be deleted once the extension is installed. Otherwise relevant settings will be gone.

Lastly, installing extensions is supposed to be fairly easy.

You just replace firefox installer with the one from mozilla installer, and then edit the INI file to install all the XPI extensions that you want. You won't have all the problems that you previously mentioned, then.

Link to comment
Share on other sites

@prathapml and @bucketbuster well that's the thing i would never do. if your drive and your username is not the same than your firefox profile will be totally f...!

I agree with that. Firefox profile depends on the current user.

But there is always a solution if your firefox doesn't work properly because of this.

Open the "chrome.rdf", and edit the paths there. I suggest using Metapad or Notepad2, because it is easier. Use the "replace" feature.

Or if you are TOO LAZY building your own installer (which isn't really that difficult), use FFDeploy. :P

Link to comment
Share on other sites

Hi again,

yeah, I know, Astalavista ... don´t be offended if I am reluctant to switch to your method of doing things, the same goes for SimonSays and others ... I have spent more than 30 hours on this and I need this to work now, otherwise I would need to call it a failure and I don´t wanna do that :)

And I guess I found the solution to my problem. If I let Winrar copy the profile to the APPDATA folder by unpacking the dummy profile from an SFX into that folder, everything works fine. I have no idea why manually copying it with xcopy will not work but that may be some sort of Windows problem, how knows ...

What I don´t quite understand is, why you guys here seem to concentrate on making default installation packages for users instead of finding ways to use as much ressources offered by the original installers as possible. I have read SimonSays´guide and to be honest, my head was spinning afterwards. This is sooo complicated.

Less complicated but unneccessary in my humble opinion are installations where a preinstalled firefox folder and profile is being copied and then adapted to a new PC. This is no good practice with other apps and I don´t see a good enough reason for falling back to that "preWindowsNT habit" as I would call it.

Anyway ... I think my installation is at least as easy as all the other methods used in this forum if not easier, while having the advantage to be very flexible if a new firefox version comes out or new extension are being used. IN addition to that, uninstalling Firefox is possible and Firefox manages profile creation on its own, without the need for any special VBS script or other tools to adapt an existing profile ...

This is what I do:

1. Download any Firefox distribution in any language.

2. Unpack, replace Setup.exe with Setup.exe from Mozilla package.

3. Adapt config.ini to run in silent mode.

4. OPTIONAL: Copy Plugins folder from an existing firefox installation ( for Flash/shockwave plugins for instance) to a new location

5. OPTIONAL: Adapt default profile (prefs.js, bookmark.html etc.) in Firefox default/profile folder and copy that to a new location

6. Create a dummy profile that is just going to be used to install extensions without Firefox popping up the Import Wizard and copy it to a new location.

7. Pack the dummy profile (Mozilla folder in APPDATA) using Winrar, making an SFX (Mozilla.exe) using that code:

Path=%APPDATA%
Overwrite=1

8. Add this to a default.cmd to make Firefox the default browser: <<---- THIS PART IS FROM SIMONSAYS GUIDE ! THANKS !!!

(I just took out 4 lines concerning MS IE that I am running during T12 stage so it affects the default user profile )

@echo off
cmdow @ /HID
REM Variables
FOR %%A IN ("%PROGRAMFILES%") DO SET SHORTPF=%%~sA
REM FIREFOX

REG ADD "HKLM\SOFTWARE\Classes\.htm" /VE /D "FirefoxHTML" /F
REG ADD "HKLM\SOFTWARE\Classes\.html" /VE /D "FirefoxHTML" /F
REG ADD "HKLM\SOFTWARE\Classes\FirefoxHTML\DefaultIcon" /VE /D "%SHORTPF%\MOZILL~1\FIREFOX.EXE,1" /F
REG ADD "HKLM\SOFTWARE\Classes\FirefoxHTML\shell\open\command" /VE /D "%SHORTPF%\MOZILL~1\FIREFOX.EXE -url \"%%1\"" /F

REG ADD "HKLM\SOFTWARE\Classes\ftp\DefaultIcon" /VE /D "%SHORTPF%\MOZILL~1\FIREFOX.EXE,1" /F
REG ADD "HKLM\SOFTWARE\Classes\ftp\shell\open\command" /VE /D "%SHORTPF%\MOZILL~1\FIREFOX.EXE -url \"%%1\"" /F
REG DELETE "HKLM\SOFTWARE\Classes\ftp\shell\open\ddeexec" /F

REG ADD "HKLM\SOFTWARE\Classes\gopher\DefaultIcon" /VE /D "%SHORTPF%\MOZILL~1\FIREFOX.EXE,1" /F
REG ADD "HKLM\SOFTWARE\Classes\gopher\shell\open\command" /VE /D "%SHORTPF%\MOZILL~1\FIREFOX.EXE -url \"%%1\"" /F
REG DELETE "HKLM\SOFTWARE\Classes\gopher\shell\open\ddeexec" /F

REG ADD "HKLM\SOFTWARE\Classes\http\DefaultIcon" /VE /D "%SHORTPF%\MOZILL~1\FIREFOX.EXE,1" /F
REG ADD "HKLM\SOFTWARE\Classes\http\shell\open\command" /VE /D "%SHORTPF%\MOZILL~1\FIREFOX.EXE -url \"%%1\"" /F
REG DELETE "HKLM\SOFTWARE\Classes\http\shell\open\ddeexec" /F

REG ADD "HKLM\SOFTWARE\Classes\https\DefaultIcon" /VE /D "%SHORTPF%\MOZILL~1\FIREFOX.EXE,1" /F
REG ADD "HKLM\SOFTWARE\Classes\https\shell\open\command" /VE /D "%SHORTPF%\MOZILL~1\FIREFOX.EXE -url \"%%1\"" /F
REG DELETE "HKLM\SOFTWARE\Classes\https\shell\open\ddeexec" /F

9. Add this to your runonceex.cmd ( of course adapting to your needs/paths etc. )

REG ADD %KEY%\008 /VE /D "Mozilla Firefox 1.0" /f
REG ADD %KEY%\008 /V 1 /D "%CDROM%\Setup\Firefox\dummy\Mozilla.exe /S" /f
REG ADD %KEY%\008 /V 2 /D "%CDROM%\Setup\Firefox\setup.exe -ira" /f
REG ADD %KEY%\008 /V 3 /D "CMD /C xcopy /S /E /H /Y %CDROM%\SETUP\Firefox\plugins\*.* \"%PROGRAMFILES%\Mozilla Firefox\plugins\\"" /f
REG ADD %KEY%\008 /V 4 /D "CMD /C xcopy /S /E /H /Y %CDROM%\SETUP\Firefox\profile\*.* \"%PROGRAMFILES%\Mozilla Firefox\defaults\profile\\"" /f
REG ADD %KEY%\008 /V 5 /D "CMD /C %CDROM%\SETUP\Firefox\default.cmd" /f

REG ADD %KEY%\009 /VE /D "Mozilla Firefox Extensions" /f
REG ADD %KEY%\009 /V 1 /D "\"%PROGRAMFILES%\Mozilla Firefox\firefox.exe\" -install-global-extension %CDROM%\SETUP\Firefox\xpi\auto_copy-0.3-fx.xpi" /f
REG ADD %KEY%\009 /V 2 /D "\"%PROGRAMFILES%\Mozilla Firefox\firefox.exe\" -install-global-extension %CDROM%\SETUP\Firefox\xpi\disable_targets_for_downloads-0.8-fx.xpi" /f
REG ADD %KEY%\009 /V 3 /D "\"%PROGRAMFILES%\Mozilla Firefox\firefox.exe\" -install-global-extension %CDROM%\SETUP\Firefox\xpi\favorites_converter_(export)-1.0.1-fx.xpi" /f
REG ADD %KEY%\009 /V 4 /D "\"%PROGRAMFILES%\Mozilla Firefox\firefox.exe\" -install-global-extension %CDROM%\SETUP\Firefox\xpi\flashgot-0.5.5-fx+mz.xpi" /f
REG ADD %KEY%\009 /V 5 /D "\"%PROGRAMFILES%\Mozilla Firefox\firefox.exe\" -install-global-extension %CDROM%\SETUP\Firefox\xpi\ieview-0.84-fx-windows.xpi" /f
REG ADD %KEY%\009 /V 6 /D "\"%PROGRAMFILES%\Mozilla Firefox\firefox.exe\" -install-global-extension %CDROM%\SETUP\Firefox\xpi\TargetAlert.xpi" /f

10. IN the cleanup phase I delete the dummy profile in %APPDATA% again, so that next time, when installation is finished and the Administrator (who runs the silent installation) needs to use the browser, a new profile is being created and THEN the Import Wizard is running (which is fine then for me).

Thats it ! For my needs this is enough. The Import Wizard does not pop up while extensions are installed and I stay as close to what Firefox brings with it to install itself and extensions so I am more flexible in the long run.

Just tested it and for the first time in all those long hours, this worked perfectly !

Bye,

Alex

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...