Jump to content

New Method For Firefox


LaptoniC

Recommended Posts

After trying a lot of methods and failing badly I tried to make unattended Firefox by myself.

What is the andvantages

* No dependence of where firefox is installed

* Flexible for update,just update extension or theme setup file

* One default file for every profile

* Automatic random name for profiles just like original firefox

Bugs:

Adblock doesnt install by commandline.Bugfree version is here

I used some of codes from simonsays'.Here is what I do.

1) Create Directory lets say C:\Work and unpack Firefox setup files to that directory.

2) Inside this directory create Directory named "Setup"

3) In this "Setup" directory directory create below directories

Plugins

Profile

XPI

searchplugins

JAR

4) Install firefox,extensions and themes and tweak it the way you want.Go to

%APPDATA%\Mozilla\Firefox\Profiles\random.default\

copy prefs.js and bookmarks.html to C:\Work\Setup\Profile

5) Put your extensions' setup file(files end with .xpi) to C:\Work\Setup\XPI

6) Put your themes' setup file(files end with .jar) to C:\Work\Setup\JAR

7) Put your plugins(%PROGRAMFILES%Mozilla Firefox\plugins\*.*) to C:\Work\Setup\Plugins

8) Put your search plugins(%PROGRAMFILES%Mozilla Firefox\searchplugins\*.*) to C:\Work\Setup\searchplugins

9) Create setup.cmd file inside C:\Work\Setup with belowed content

@echo off
cmdow @ /HID
SET pfname="%APPDATA%\Mozilla\Firefox\Profiles.ini"
FOR %%A IN ("%PROGRAMFILES%") DO SET SHORTPF=%%~sA

"%SYSTEMDRIVE%\Install\Firefox\setup.exe" -ms

REM there is a limit in tokens.Token bigger than 31 is ignored.So only lower ascii numbers will be used

REM Create random directory name for new profile
:MP
set a=0
set mypath=
:LP
if %a%==8 GOTO :NEXT
SET /A i=(%RANDOM% %%% 26)+1
FOR /F "tokens=%i%" %%j IN ("a b c d e f g h i j k l m n o p q r s t u v w x y z") do set mypath=%mypath%%%j
SET /A a+=1
GOTO :LP
:NEXT

IF EXIST "%APPDATA%\Mozilla\Firefox\Profiles\%mypath%.default\*.*" GOTO :MP
REM Create directory
md "%APPDATA%\Mozilla\Firefox\Profiles\%mypath%.default\
XCOPY /Y /E /Q /H /R "%SYSTEMDRIVE%\Install\Firefox\Setup\Profile"  "%APPDATA%\Mozilla\Firefox\Profiles\%mypath%.default"

REM CREATE profiles.ini
echo.
echo [General]>>%pfname%
echo StartWithLastProfile=^1>>%pfname%
echo.>> %pfname%
echo [Profile0]>>%pfname%
echo Name=default>>%pfname%
echo IsRelative=^1>>%pfname%
echo Path=Profiles/%mypath%.default>>%pfname%
echo.>> %pfname%

REM Extensions and Themes Setup
REM each for command is on one line no line break
for %%e in ("%SYSTEMDRIVE%\Install\Firefox\Setup\XPI\*.xpi") do start /wait %SHORTPF%\MOZILL~1\FIREFOX.EXE -install-global-extension "%%e"
for %%e in ("%SYSTEMDRIVE%\Install\Firefox\Setup\JAR\*.jar") do start /wait %SHORTPF%\MOZILL~1\FIREFOX.EXE -install-global-theme "%%e"

REM Plugins and Searchplugins Setup
XCOPY /Y /E /Q /H /R "%SYSTEMDRIVE%\Install\Firefox\Setup\plugins" "%SHORTPF%\MOZILL~1\plugins"
XCOPY /Y /E /Q /H /R "%SYSTEMDRIVE%\Install\Firefox\Setup\searchplugins" "%SHORTPF%\MOZILL~1\searchplugins"
EXIT

Link to comment
Share on other sites


sorry but i must get angry man :angry:. if you ask me why i should answer that you didn't get permission; not mine, most of the code was written by other users

i find it a rip word by word (you even didn't change the SHORTPF variable lol).

the only difference i can see is "if profile dir then profile.ini" that i could also use without notifying you ;)

i won't ask you (or any1) to remove the content, they're public knowledges and can be used by all but i find insulting just copying some lines of the cmd and the way it works after i explained it on the thread i started.

edit: just re-read the topic title "New Method For Firefox" simply RLOL!

Edited by SiMoNsAyS
Link to comment
Share on other sites

What are you talking about man.I have used just some simple codes. Belive me I know how to do batch coding.Look at the random code.If you want I can change below code to long pathname and remove your short pathname too.I left them just to give you credit.

Edit:Here is new batch file without your beloved variable shortpf.Of course this time no donuts err credits for you :)

@echo off
cmdow @ /HID
SET pfname="%APPDATA%\Mozilla\Firefox\Profiles.ini"

"%SYSTEMDRIVE%\Install\Firefox\setup.exe" -ms

REM there is a limit in tokens.Token bigger than 31 is ignored.So only lower ascii numbers will be used

REM Create random directory name for new profile
:MP
set a=0
set mypath=
:LP
if %a%==8 GOTO :NEXT
SET /A i=(%RANDOM% %%% 26)+1
FOR /F "tokens=%i%" %%j IN ("a b c d e f g h i j k l m n o p q r s t u v w x y z") do set mypath=%mypath%%%j
SET /A a+=1
GOTO :LP
:NEXT

IF EXIST "%APPDATA%\Mozilla\Firefox\Profiles\%mypath%.default\*.*" GOTO :MP
REM Create directory
md "%APPDATA%\Mozilla\Firefox\Profiles\%mypath%.default\
XCOPY /Y /E /Q /H /R "%SYSTEMDRIVE%\Install\Firefox\Setup\Profile"  "%APPDATA%\Mozilla\Firefox\Profiles\%mypath%.default"

REM CREATE profiles.ini
echo [General]>>%pfname%
echo StartWithLastProfile=^1>>%pfname%
echo.>> %pfname%
echo [Profile0]>>%pfname%
echo Name=default>>%pfname%
echo IsRelative=^1>>%pfname%
echo Path=Profiles/%mypath%.default>>%pfname%
echo.>> %pfname%

REM Extensions and Themes Setup
for %%e in ("%SYSTEMDRIVE%\Install\Firefox\Setup\XPI\*.xpi") do start /wait /d "%PROGRAMFILES%\Mozilla Firefox\" Firefox.exe -install-global-extension "%%e"

for %%e in ("%SYSTEMDRIVE%\Install\Firefox\Setup\JAR\*.jar") do start /wait /d "%PROGRAMFILES%\Mozilla Firefox\" Firefox.exe -install-global-theme "%%e"

REM Plugins and Searchplugins Setup
XCOPY /Y /E /Q /H /R "%SYSTEMDRIVE%\Install\Firefox\Setup\plugins" "%PROGRAMFILES%\Mozilla Firefox\plugins"
XCOPY /Y /E /Q /H /R "%SYSTEMDRIVE%\Install\Firefox\Setup\searchplugins" "%PROGRAMFILES%\Mozilla Firefox\searchplugins"
EXIT

Link to comment
Share on other sites

Djeezz. why again such a method???

There is an extremely simple way to create your own costumized profile... by starting firefox in defaultprofile mode... it is easier, more simple and you can make less mistakes... no need for all that code!!

it is also very easy to update your profile if you want some changes.

this method is explained here on msfn... do some search

Link to comment
Share on other sites

If you copy all files from default directory ofcourse you will have all extension themes etc.However this profile has hardcoded paths in it if you try to install firefox on some computers whose windows directory is other than you configured it wont work.

Link to comment
Share on other sites

ok so also:

@echo off

cmdow @ /HID

SET pfname="%APPDATA%\Mozilla\Firefox\Profiles.ini"

FOR %%A IN ("%PROGRAMFILES%") DO SET SHORTPF=%%~sA

"%SYSTEMDRIVE%\Install\Firefox\setup.exe" -ms

REM there is a limit in tokens.Token bigger than 31 is ignored.So only lower ascii numbers will be used

REM Create random directory name for new profile

:MP

set a=0

set mypath=

:LP

if %a%==8 GOTO :NEXT

SET /A i=(%RANDOM% %%% 26)+1

FOR /F "tokens=%i%" %%j IN ("a b c d e f g h i j k l m n o p q r s t u v w x y z") do set mypath=%mypath%%%j

SET /A a+=1

GOTO :LP

:NEXT

IF EXIST "%APPDATA%\Mozilla\Firefox\Profiles\%mypath%.default\*.*" GOTO :MP

REM Create directory

md "%APPDATA%\Mozilla\Firefox\Profiles\%mypath%.default\

XCOPY /Y /E /Q /H /R "%SYSTEMDRIVE%\Install\Firefox\Setup\Profile"  "%APPDATA%\Mozilla\Firefox\Profiles\%mypath%.default"

REM CREATE profiles.ini

echo.

echo [General]>>%pfname%

echo StartWithLastProfile=^1>>%pfname%

echo.>> %pfname%

echo [Profile0]>>%pfname%

echo Name=default>>%pfname%

echo IsRelative=^1>>%pfname%

echo Path=Profiles/%mypath%.default>>%pfname%

echo.>> %pfname%

REM Extensions and Themes Setup

REM each for command is on one line no line break

for %%e in ("%SYSTEMDRIVE%\Install\Firefox\Setup\XPI\*.xpi") do start /wait %SHORTPF%\MOZILL~1\FIREFOX.EXE -install-global-extension "%%e"

for %%e in ("%SYSTEMDRIVE%\Install\Firefox\Setup\JAR\*.jar") do start /wait %SHORTPF%\MOZILL~1\FIREFOX.EXE -install-global-theme "%%e"

REM Plugins and Searchplugins Setup

XCOPY /Y /E /Q /H /R "%SYSTEMDRIVE%\Install\Firefox\Setup\plugins" "%SHORTPF%\MOZILL~1\plugins"

XCOPY /Y /E /Q /H /R "%SYSTEMDRIVE%\Install\Firefox\Setup\searchplugins" "%SHORTPF%\MOZILL~1\searchplugins"

EXIT

marked on red, appeared on my batch file too ;)

i don't mind the name of the variable, so you left it to let "credit me"?! lol

you simply copied most of what others written and created "a new method for firefox".

things clear, i don't mind if you use anything you read about here, on msfn, but what you call as "to do batch coding", i call it read and copy on a new thread.

edit: nothing left to say, i hope you don't mind if i use part of what you wrote here on my own setup, do you? ;)

another thing forgot to say is that is funny that you ask for help on the other help, PM me a couple of times about it and then say thanks like this

Edited by SiMoNsAyS
Link to comment
Share on other sites

What are you talking about man.I have used just some simple codes. Belive me I know how to do batch coding.Look at the random code.If you want I can change below code to long pathname and remove your short pathname too.I left them just to give you credit.

Edit:Here is new batch file without your beloved variable shortpf.Of course this time no donuts err credits for you :)

You took code from someone else... who by the way has contributed to some of the most useful projects on this forum... took the code as your own and created a new thread instead of posting in the existing thread where you got the code. :unsure:

How can you not see this as shady behavior? How did you give him credit by using his code without posting anything stating it was his code? :no:

Link to comment
Share on other sites

No one see my intention let me clarify again.In my first post read it carefully there is a credit to simonsays.As you see from this post there is no edit.So it was there and will be there.Second u say that "rip word by word" but if you *read* my post you will see that I clearly state that I use some codes from your cmd file.And it is not rip word by word :lol: What you want to add more ?In your first very positive ROFL post you tried to make me some kind of thief.Yeah yeah bash the new kid on the block.

I added new batch code and now you are saying that red codes are belong to you.Are you serious man?

@echo off ;you found those one

cmdow @ /HID ;and that ?

How can I run firefox setup.I am puzzled :lol:

"%SYSTEMDRIVE%\Install\Firefox\setup.exe" -ms

Look at the command parameters.I am copying to random directory that I created in my batch file.I guess you didnt read it

XCOPY /Y /E /Q /H /R "%SYSTEMDRIVE%\Install\Firefox\Setup\Profile" "%APPDATA%\Mozilla\Firefox\Profiles\%mypath%.default"

I wont comment on other red ones.xcopy copies files/folders I dont know any other commands man :thumbup

Yes it is true that I PM'ed you about firefox and if you remember I said that your methods didnt worked for me and I said that will do my own.Do you remember that one also?

You act like a child whose candy is taken.I guess you are so touchy about firefox.Take it man.I wont comment anymore on this thread.If you have still problems you can PM me.I will add one post at later about automatic setup file which extracts original setup adds extensions themes and packs it again but currently I am coding it and no red codes will be harmed on this one :lol:

Link to comment
Share on other sites

Hi everyone

I am not programmer I don't know any thing about bach files any way I can't get firerfox to install, the other problem is nero6.6.0.8 keep defaulting demo mode.

this is my file listing.

thanks again and excuse me if this is the worng thread.

REG ADD %KEY%\020 /VE /D "Nero6" /f

REG ADD %KEY%\022 /V 1 /D "%cdrom%\App\Nero6\Nero6.exe /silent /noreboot /no_ui /snxxx xxxx xxxx xxxx xxxx xxxx xxxx /write_sn

REG ADD %KEY%\026 /VE /D "Ad-Aware Pro" /f

REG ADD %KEY%\026 /V 1 /D "%cdrom%\app\Adaware\Adaware.exe /S" /f

REG ADD %KEY%\026 /V 2 /D "taskkill /IM Adaware.exe /F" /f

REG ADD %KEY%\026 /V 3 /D "taskkill /IM hh.exe /F" /f

REG ADD %KEY%\026 /V 4 /D "taskkill /IM Ad-Aware.exe /F" /f

REG ADD %KEY%\028 /VE /D "SunJava" /f

REG ADD %KEY%\028 /V 1 /D "%cdrom%\App\SunJava\j2re-1_4_2-windows-i586.exe /s /v/qn" /f

REG ADD %KEY%\030 /VE /D "AdobeReader7" /f

REG ADD %KEY%\032 /V 1 /D "%cdrom%\App\AdobeReader7\Acrobat7lite.exe -p"-s /v\"/qn\""" /f

reg add %Key%\065 /VE /D "FireFox" /f

reg add %Key%\065 /V 1 /D "%CDROM%\App\Firefox\firefox.exe /silent /nocancel" /f

REG ADD %KEY%\90 /VE /D "Apply Registry Tweaks" /f

REG ADD %KEY%\90 /V 1 /D "REGEDIT /S %cdrom%\App\Tweaks.reg" /f

Link to comment
Share on other sites

appears that the thing is not finished yet... first, in the first of my posts i didn't want to make you appear as a "thief" but i think my moral is different than yours, use that word if you like, i've got others on my head...

"bash the new kid", this is funny, once i was a new kid (and i still consider myself one). do you honestly think that i got any benefit from my total forum posts? :lol: don't use this kind of false statements

what i stated in red is the code common to both batch files, is not "mine" as every1 (except u) can understand.

yeah, you pm'ed me and asked for help, i answered you, and you said it didn't worked. question is, why is working now with a sooo similar batch file? ;)

You act like a child whose candy is taken.I guess you are so touchy about firefox.Take it man.I wont comment anymore on this thread.If you have still problems you can PM me.I will add one post at later about automatic setup file which extracts original setup adds extensions themes and packs it again but currently I am coding it and no red codes will be harmed on this one
that hurts, well maybe i'm picky, indeed i am but, this variable was used by jdoe to add reg entries...
FOR %%A IN ("%PROGRAMFILES%") DO SET SHORTPF=%%~sA

this one is what i used to add the necessary files to profile at that exact timeline...

XCOPY /Y /E /Q /H /R "%SYSTEMDRIVE%\Install\Firefox\Setup\Profile"  "%APPDATA%\Mozilla\Firefox\Profiles\%mypath%.default"
note: maybe on your next "batch file" you can remove that amount of unnecessary code and simply create a new dir and point it on profiles.ini. that plenty of lines creating a random dir sucks as you could use ANY dir suplied on profiles.ini

this one is copied WORD BY WORD (CAPITALS INCLUDED) from my setup.cmd, code was written by crahak...

REM Extensions and Themes Setup

REM each for command is on one line no line break

for %%e in ("%SYSTEMDRIVE%\Install\Firefox\Setup\XPI\*.xpi") do start /wait %SHORTPF%\MOZILL~1\FIREFOX.EXE -install-global-extension "%%e"

for %%e in ("%SYSTEMDRIVE%\Install\Firefox\Setup\JAR\*.jar") do start /wait %SHORTPF%\MOZILL~1\FIREFOX.EXE -install-global-theme "%%e"

this is from my own WORD BY WORD...

REM Plugins and Searchplugins Setup

XCOPY /Y /E /Q /H /R "%SYSTEMDRIVE%\Install\Firefox\Setup\plugins" "%SHORTPF%\MOZILL~1\plugins"

XCOPY /Y /E /Q /H /R "%SYSTEMDRIVE%\Install\Firefox\Setup\searchplugins" "%SHORTPF%\MOZILL~1\searchplugins"

EXIT

as you can see there are more than me behind this and i don't need to PM you about it. i don't like PMs because all what i say can be read by others.

msfn is a friendly comunity and i really hate this kind of discussions so you better "new guy" change your actitude ;)

Link to comment
Share on other sites

sorry but i must get angry man :angry:. if you ask me why i should answer that you didn't get permission; not mine, most of the code was written by other users

i find it a rip word by word (you even didn't change the SHORTPF variable lol).

the only difference i can see is "if profile dir then profile.ini" that i could also use without notifying you ;)

i won't ask you (or any1) to remove the content, they're public knowledges and can be used by all but i find insulting just copying some lines of the cmd and the way it works after i explained it on the thread i started.

edit: just re-read the topic title "New Method For Firefox" simply RLOL!

simon angry, me scared

Link to comment
Share on other sites

While I like to see new users contribute to the forum, this seems to me this is a blantant rip off Simon's and others work. The point he was trying to make about stealing his work, is that you start off like this.

After trying a lot of methods and failing badly I tried to make unattended Firefox by myself.
That tells me, you found your own method. Different wording could have helped here. Then you go on to describe it, you obviously copied much of Simon's code, without a comment in the batch file giving him props (you do know how to make comments, right?).

Some suggestions I have, remove the randomizer code. Why don't you hardcode a name in there for the profile? Makes your code look cleaner, and makes things go easier.

You seemed to have missed simons points about the stuff in red. He is talking mainly about the hardcoded path you have in here. You said I could extract any where, but it very clearly says I need my files in this directory. If you knew how to write batch files, you wouldn't have made such a silly mistake.

%SYSTEMDRIVE%\Install\Firefox\Setup\

Now Simon, do you expect people to not use this code?

REM Extensions and Themes Setup
REM each for command is on one line no line break
for %%e in ("%SYSTEMDRIVE%\Install\Firefox\Setup\XPI\*.xpi") do start /wait %SHORTPF%\MOZILL~1\FIREFOX.EXE -install-global-extension "%%e"
for %%e in ("%SYSTEMDRIVE%\Install\Firefox\Setup\JAR\*.jar") do start /wait %SHORTPF%\MOZILL~1\FIREFOX.EXE -install-global-theme "%%e"

I have the same in my own setup, just different paths. I understand your anger, as he didn't change a thing, but its not exclusive to your installer.

As for my take on this. I wouldn't use it. I don't use Simon's install, but have taken a look at it. This I wouldn't use either. Its unfinished, and the person who claims this code is his, hasn't checked it as clearly as he/she should. I like new users, but if your work is based off another's, ask their permission first and give credit where it is due.

Link to comment
Share on other sites

I said I wont comment on this subject but you are forcing me to do.

Your batch file didnt worked for me simonsays, "didnt" and as you remember in my last PM I said this and you didnt replied back so that means it doesnt work for me the way it is.

marked on red, appeared on my batch file too
what i stated in red is the code common to both batch files, is not "mine" as every1 (except u) can understand.

What a logic and maturity :) or I am understanding english badly, Maybe

note: maybe on your next "batch file" you can remove that amount of unnecessary code and simply create a new dir and point it on profiles.ini. that plenty of lines creating a random dir sucks as you could use ANY dir suplied on profiles.ini
Who said I am writing batch file Einstein? Maybe your cultural background implied this to you.Did I said anything about your batch code, how "sucks" your batch code or did I said every1 (except u) can write a code that can use long pathnames in batch ?I coded random algo just the same as firefox do(except numbers because of enumaration)I know how to read source codes of mozilla dont you know? to bad so sad :)
msfn is a friendly comunity and i really hate this kind of discussions so you better "new guy" change your actitude

You say this and still continue this issue.I am puzzled :blink: I tried to stop it but you do not stop.You are continuing this in front of every audience what can be the reason of it?

@sleepnmojo

I understand your concern about code using and not mentioning names.However for the third time I say "I DID WRITE HIS NAME IN THE FIRST POST".His name is there.

I did random code just to be sure with firefox code I am programmer myself and I have learned from my experinces that all hardcoded paths in the end gives you trouble.It may not for the firefox, but it is my habit to do in documented way.

%SYSTEMDRIVE%\Install\Firefox\Setup\

It isnt silly mistake but yours is.I made a self extracting RAR file and it opens to %SYSTEMDRIVE%\Install\Firefox\Setup\..etc .I said that you can extract to anywhere "your original setup files" so you can work and make a sfx of it which will point to above path.I didnt wrote all of them because I thought it is clear.Sorry for that.

I apoligize eveyone for the trouble but please do not insult anyone in your posts or do word games.

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...