MSFN Forum: Annoying fox... - MSFN Forum

Jump to content



Unattended CD/DVD Guide Homepage · MSFN Forum Rules

Welcome to the Applications Installs forum. Make sure you read the forum rules before you start posting.

Links/Requests to warez and/or any illegal material (porn, cracks, serials, etc..) will not be tolerated. Discussion of circumventing WGA/activation/timebombs/keygens or any other illegal activity will also not be tolerated.

We try our best to keep this forum clean of illegal content. If you see any illegal activity use the "report" button you find in every post to report the specific post to the moderators. If you ignore any of the rules you will be banned without notice.

Read Forum Rules
Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Annoying fox... There must be another solution. Rate Topic: -----

#1 User is offline   SwedenXP 

  • Member
  • PipPip
  • Group: Members
  • Posts: 226
  • Joined: 28-September 03

  Posted 25 July 2005 - 07:42 AM

This is the story;

Trying to do a silent install of Firefox 1.0.6 + extensions + bookmarks/favorites.

The silent install is no problem. The extensions goes just fine. But - to do the silent install of the bookmarks/favorites I have to know the name of the "something.default" directory located in "%userprofile%\Applic~1\Mozilla\Firefox\Profiles\" and this varies from install to install - itīs an "8 charactar (numbers and figures) .default" nasty thing :realmad: Itīs into this directory my bookmarks.html should go which is no problem - when I know the correct name of the directory...

The question to You, ladies and gentlemen is;

Is there a way to set the name of the :realmad: directory?

Or

Is there a way to find out the name?

I install Firefox + the rest from within a .cmd file - so thats where the name of the directory eventually will go...

MegaBigThanx in advance!

/ SwedenXP

This post has been edited by SwedenXP: 25 July 2005 - 08:06 AM



#2 User is offline   redfive19 

  • Junior
  • Pip
  • Group: Members
  • Posts: 96
  • Joined: 17-August 04

Posted 25 July 2005 - 07:59 AM

I am sure there is a way. I've struggled with this same thing. I like to do clean installs as much as possible (i.e. not repackaging it) and this is very interesting. This folder also holds your prefs.js which is also useful. I will definately be following this thread. I've been trying to write an autoit script for this very purpose but I am still a little fuzzy on how the findfile works in autoit.

#3 User is offline   Achdine 

  • Junior
  • Pip
  • Group: Members
  • Posts: 97
  • Joined: 11-May 05

Posted 25 July 2005 - 10:02 AM

First thing's first...

SwedenXP said:

directory located in "%userprofile%\Applic~1\Mozilla\Firefox\Profiles\"
You can use %AppData% instead of "%UserProfile%\Application Data".

Secondly, I don't really see why you need to know the directory name. You can CD to it using
CD "%AppData%\Mozilla\Firefox\Profiles\*.default"
, and once this is your working directory you can copy stuff in like normal, and you can use partial paths for subdirs.
Copy "%CDROM%\Firefox\userContent.css" "chrome\"
Copy "%CDROM%\Firefox\prefs.js" "%CD%"


If for some reason you really needed to remain in the original directory, or have some other reason for needing to know the folder name, try this
@Echo Off
Set ScriptDir=%CD%
CD "%AppData%\Mozilla\Firefox\Profiles\*.default"
Set FFProfile=%CD%
Set FFProfileFolder=%CD:~-16%
Set FFProfileName=%CD:~-16,-8%
CD %ScriptDir%

ECHO Found Firefox profile directory as %FFProfile%
ECHO Found Firefox profile folder as %FFProfileFolder%
ECHO Found Firefox profile name as %FFProfileName%

Pause
Doubtlessly there is a more elegant way to do this, but it works nonetheless (unless I typoed :P). I just use "Silence of the Foxes" to make my installer.

This post has been edited by Achdine: 25 July 2005 - 10:02 AM


#4 User is offline   SwedenXP 

  • Member
  • PipPip
  • Group: Members
  • Posts: 226
  • Joined: 28-September 03

Posted 25 July 2005 - 10:56 AM

@Achdine - thanx for Your suggestions - I will look into them - although I donīt understand them fully...

But thats why I like this forum :thumbup When I donīt understand - I just ask - and eventually I will learn something :huh:

From a not so sunny Sweden

/ SwedenXP B)

This post has been edited by SwedenXP: 25 July 2005 - 11:16 AM


#5 User is offline   SwedenXP 

  • Member
  • PipPip
  • Group: Members
  • Posts: 226
  • Joined: 28-September 03

Posted 26 July 2005 - 07:09 AM

@Achdine - Big step forward for me :yes:

I would like to ask one more thing (atleast) :rolleyes:

How do I get a .cmd file to wait for example 30 seconds before continuing (still within the same .cmd file).

Why? It takes some time for Firefox to complete itīs installation - and before thats done the extensions and favorietes will not install properly.

Hoping for yet another good answer from You or somebody else :whistle:

/ SwedenXP B)

This post has been edited by SwedenXP: 26 July 2005 - 07:55 AM


#6 User is offline   redfive19 

  • Junior
  • Pip
  • Group: Members
  • Posts: 96
  • Joined: 17-August 04

Posted 26 July 2005 - 07:26 AM

SplashTextOn('', "Installing Mozilla Firefox 1.0.6, please stand by...", 400, 25, -1, -1, 1, '', 14)
RunWait("Firefox106.exe -MS")
SplashTextOn("", "Installing Macromedia Flash and Shockwave, please stand by...", 600, 25, -1, -1, 1, '', 14)
RunWait("msiexec /i mm_fl_sw_installer.msi /qn")
SplashOff()
SplashTextOn("", "Installing Mozilla Firefox Plug-In's && Extentions, please stand by...", 600, 25, -1, -1, 1, '', 14)

FileChangeDir(@Programfilesdir & "\Mozilla Firefox")
SplashTextOn('', "Installing GMail Notifier", 400, 25, -1, -1, 1, '', 14)
RunWait("firefox.exe -install-global-extension " & """" & @ScriptDir & "\gmail_notifier-0.4.3-fx+mz.xpi""")
SplashTextOn('', "Installing Adblock", 400, 25, -1, -1, 1, '', 14)
RunWait("firefox.exe -install-global-extension " & """" & @ScriptDir & "\adblock-0.5.2.039-fx.xpi""")
SplashTextOn('', "Installing IEView", 400, 25, -1, -1, 1, '', 14)
RunWait("firefox.exe -install-global-extension " & """" & @ScriptDir & "\ie_view-1.2.4-fx+mz.xpi""")
SplashTextOn('', "Installing DownThemAll", 400, 25, -1, -1, 1, '', 14)
RunWait("firefox.exe -install-global-extension " & """" & @ScriptDir & "\downthemall!-0.9.4-fx.xpi""")
SplashTextOn('', "Installing Cute Menus", 400, 25, -1, -1, 1, '', 14)
RunWait("firefox.exe -install-global-extension " & """" & @ScriptDir & "\cutemenus_2-0.6.1-fx+mz.xpi""")
SplashTextOn('', "Installing MediaPlayerConnectivity", 400, 25, -1, -1, 1, '', 14)
RunWait("firefox.exe -install-global-extension " & """" & @ScriptDir & "\mediaplayerconnectivity-0.3.9-fx+ns.xpi""")
SplashTextOn('', "Installed Download Statusbar", 400, 25, -1, -1, 1, '', 14)
RunWait("firefox.exe -install-global-extension " & """" & @ScriptDir & "\download_statusbar-0.9.2-fx.xpi""")
SplashTextOn('', "Installing AIRoboform", 400, 25, -1, -1, 1, '', 14)
RunWait("firefox.exe -install-global-extension " & """" & @ScriptDir & "\roboform_toolbar_extension-6.3.6-fx.xpi""")
SplashTextOn('', "Installing FocusLastSelectedTab", 400, 25, -1, -1, 1, '', 14)
RunWait("firefox.exe -install-global-extension " & """" & @ScriptDir & "\flst.xpi""")
SplashTextOn('', "Installing Disable XPI Install Delay", 400, 25, -1, -1, 1, '', 14)
RunWait("firefox.exe -install-global-extension " & """" & @ScriptDir & "\mr_tech_disable_xpi_install_delay-1.2.2-fx+mz+ns+sb+tb.xpi""")
SplashTextOn('', "Installing Hotmail Tabs", 400, 25, -1, -1, 1, '', 14)
RunWait("firefox.exe -install-global-extension " & """" & @ScriptDir & "\hotmail_tabs-0.9-fx.xpi""")
SplashTextOn('', "Installing Forecast Fox", 400, 25, -1, -1, 1, '', 14)
RunWait("firefox.exe -install-global-extension " & """" & @ScriptDir & "\forecastfox-0.8.1.1-fx+mz+ns.xpi""")
SplashTextOn('', "Installing FlashGot", 400, 25, -1, -1, 1, '', 14)
RunWait("firefox.exe -install-global-extension " & """" & @ScriptDir & "\flashgot-0.5.9.7-fx+mz+tb.xpi""")
SplashTextOn('', "Installing Greasemonkey", 400, 25, -1, -1, 1, '', 14)
RunWait("firefox.exe -install-global-extension " & """" & @ScriptDir & "\greasemonkey-0.3.5-fx.xpi""")
SplashTextOn('', "Installing TabClickingOptions", 400, 25, -1, -1, 1, '', 14)
RunWait("firefox.exe -install-global-extension " & """" & @ScriptDir & "\tab_clicking_options-0.5.2-fx+mz.xpi""")
SplashTextOn('', "Installing Tabbrowser Prefs", 400, 25, -1, -1, 1, '', 14)
RunWait("firefox.exe -install-global-extension " & """" & @ScriptDir & "\tabbrowser_preferences-1.2.7.1-fx.xpi""")
SplashTextOn('', "Installing GMail Delete Button", 400, 25, -1, -1, 1, '', 14)
RunWait("firefox.exe -install-global-extension " & """" & @ScriptDir & "\gmail_delete_button-2.6.1-fx.xpi""")

FileChangeDir(@appdatadir & "\Mozilla\Firefox\Profiles")
$search = FileFindFirstFile("*.default")
$file = FileFindNextFile($search)
FileClose($search)

FileCopy(@scriptdir & "\bookmarks.html", @appdatadir & "\Mozilla\Firefox\Profiles\" & $file & "\bookmarks.html")
FileCopy(@scriptdir & "\prefs.js", @appdatadir & "\Mozilla\Firefox\Profiles\" & $file & "\prefs.js")

FileCopy(@ScriptDir & "\bookmarks.html", @AppDataDir  & "\Mozilla\Firefox\Profiles\")


There's my autoit script. You can subsitute what you need.....works for me!

#7 User is offline   Achdine 

  • Junior
  • Pip
  • Group: Members
  • Posts: 97
  • Joined: 11-May 05

Posted 26 July 2005 - 09:54 AM

There are many ways to get the pause you want. First try starting the Firefox installer with "Start /Wait", which will prevent the next command in the batch file from being run until the program completes. This is by far the best solution, but will not generally work if the installer has a wrapper.

You can also use a seperate .exe file to cause a delay. Search the boards for sleep.exe or wait.exe, for example. My favorite is NirCMD because it does so many other handy batch tricks as well (such as running the file completely silently, changing the volume, hiding windows, killing processes, or changing the resolution). Definitely worth integrating into your project. To create a 30 second pause with NirCMD use
NirCMDc.exe Wait 30000


Lastly you could use an internal Windows function that takes some time to complete, such as ping. Use this as a last resort.

#8 User is offline   SwedenXP 

  • Member
  • PipPip
  • Group: Members
  • Posts: 226
  • Joined: 28-September 03

Posted 26 July 2005 - 10:23 AM

@Achdine Thanx for the suggestions - but I already use the "start /wait" option - I think itīs the creation of catalogs that takes time - it happens after the installer is done... or at least at the very end...

Have thought of doing the Firefox install in the beginning of my main_batch.cmd and the extensions and favorites/bookmarks at the end. But I will try the NirCMD - because it sounds interesting!

I will be back with comments on the result.

/ SwedenXP

This post has been edited by SwedenXP: 26 July 2005 - 02:06 PM


#9 User is offline   SwedenXP 

  • Member
  • PipPip
  • Group: Members
  • Posts: 226
  • Joined: 28-September 03

Posted 26 July 2005 - 02:12 PM

@Achdine - it works really beautifully :thumbup

But itīs a shame that one have to use an external program for a "sleep/wait/pause funtion" - there ought to be some internal (WinXPPro) solution!

But as I warned :rolleyes: You - yet another question... Whereīs the best place to put the NirCMDc.exe so I can reach it from wherer I want to? At C:\ or someplace else? Finally I will delete it!

/ SwedenXP B)

#10 User is offline   Mekrel 

  • Advanced Member
  • PipPipPip
  • Group: Members
  • Posts: 372
  • Joined: 17-November 04

Posted 26 July 2005 - 08:48 PM

put it in the

$OEM$/$$/System32

folder of your Unattended CD and just call it as Achdine has, because any file in the Windows/System32 folder can be called on its own like that.

Then, you can delete it using your cleanup command file if you have one..

DEL /F "%WINDIR%\System32\Nircmdc.exe"


or without any extra program just use:

PING 127.0.0.1 -n 30>NUL


to wait 30 seconds

This post has been edited by Mekrel: 26 July 2005 - 08:50 PM


#11 User is offline   SwedenXP 

  • Member
  • PipPip
  • Group: Members
  • Posts: 226
  • Joined: 28-September 03

Posted 27 July 2005 - 12:33 PM

@Mekrel - Tried Your version with;

PING 127.0.0.1 -n 30>NUL

And it works really well.

@ All of You readers :hello:
Are there any disadvantages in using either of these two methods (Nircmdc.exe or PING)? PING seems easier since itīs already a part of XP...

/ SwedenXP B)

#12 User is offline   ODC 

  • Member
  • PipPip
  • Group: Members
  • Posts: 127
  • Joined: 22-June 04

Posted 27 July 2005 - 02:55 PM

I just wanted to point out that the profile does not have to be random. One can edit/replace the file %APPDATA%\Mozilla\Firefox\profiles.ini to point to a default profile.

[General]
StartWithLastProfile=1

[Profile0]
Name=ProfileName
IsRelative=1
Path=Profiles/ProfileName
Default=1


Just replace ProfileName with the name of your profile. You can even rename an existing random profilename with one of your choosing by renaming the directory, and editing this file to reflect the change.

This post has been edited by ODC: 27 July 2005 - 02:56 PM


#13 User is offline   SwedenXP 

  • Member
  • PipPip
  • Group: Members
  • Posts: 226
  • Joined: 28-September 03

Posted 28 July 2005 - 02:07 AM

@ODC - Yes of course one can do that...

I only take the new version - and put it in the rigtht folder - and them Iīm done - a new unattended installation :whistle: -----> less adjusting of files ----> a quicker and cleaner install -----> me :D

/ SwedenXP

#14 User is offline   Mekrel 

  • Advanced Member
  • PipPipPip
  • Group: Members
  • Posts: 372
  • Joined: 17-November 04

Posted 28 July 2005 - 07:02 AM

Quote

Are there any disadvantages in using either of these two methods (Nircmdc.exe or PING)? PING seems easier since itīs already a part of XP...


No disadvantages of either. However Nircmdc.exe can do some pretty neat things, such as creating custom shortcuts and such which will be usefull in unattended installations.

Also the CDROM open command so you can take out your unattended CD when its finished ;)

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users



All trademarks mentioned on this page are the property of their respective owners
Copyright © 2001 - 2011 msfn.org
Privacy Policy