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.
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 ...
Hereīs the complete code ...
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
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