MSFN Forum: program (or batch) to backup profiles - 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

program (or batch) to backup profiles Rate Topic: -----

#1 User is offline   fillalph 

  • Advanced Member
  • PipPipPip
  • Group: Members
  • Posts: 324
  • Joined: 29-July 03

Posted 18 November 2005 - 08:14 PM

At the moment I am backing up my firefox and thunderbird profiles manually into a WinRAR SFX and then having it extracted during install.

I know there are members on this forum that do use firefox and thunderbird, I was thinking of a good way to backup the profiles easily. the easiest way would probably be a batch.

I took a look at the capabilities of rar.exe and noticed that you it can read in a comment file using the command line.

My idea is this:
The profiles are located in: %APPDATA%\\Thunderbird\*default\ and \Mozilla\Firefox\Profiles\*default (assuming we only want to backup the default profile).

So if we change into that direct and store it as a variable and pass that along to rar.exe, we could archive into a sfx with a prewritten comment file. Once we have the backed up profiles move them over to replace the old ones on our UA cds/dvds. Then before every new UA version, we just run the batch file and presto, firefox and thunderbird profiles (bookmarks, extensions, mail, imap settings, etc.) all backed up.

I suck at writing batch files. I am going to try, but if you want to beat me to it, I won't be sad :).

]Bonkers[


#2 User is offline   fillalph 

  • Advanced Member
  • PipPipPip
  • Group: Members
  • Posts: 324
  • Joined: 29-July 03

Posted 18 November 2005 - 09:44 PM

Alright. I got it working.

EDIT!!! I split firefox and thunderbird into two files to update!

The command file (firefox_backup.cmd)
ECHO OFF
ECHO Backing up Firefox Profile
set rar="%PROGRAMFILES%\WinRAR\RAR.exe"
set temp=%CD%
IF EXIST firefox_profile.exe del %CD%\firefox_profile.bak
IF EXIST firefox_profile.exe rename %CD%\firefox_profile.exe firefox_profile.bak
C:
cd "%APPDATA%\Mozilla\Firefox\Profiles\*default"
set firefox_dir=%CD%
del /f /q "%firefox_dir%\cookies.txt"
del /f /q "%firefox_dir%\Cache\*"
%rar% a -z"%temp%\c_firefox.txt" -r -sfx firefox_profile
move "%firefox_dir%\firefox_profile.exe" "%temp%"
EXIT


The command file (thunderbird_backup.cmd)
ECHO OFF
ECHO Backing up thunderbird Profile
set rar="%PROGRAMFILES%\WinRAR\RAR.exe"
set temp=%CD%
IF EXIST thunderbird_profile.exe del %CD%\thunderbird_profile.bak
IF EXIST thunderbird_profile.exe rename %CD%\thunderbird_profile.exe thunderbird_profile.bak
C:
cd "%APPDATA%\Thunderbird\*default"
set thunderbird_dir=%CD%
%rar% a -z"%temp%\c_thunderbird.txt" -r -sfx thunderbird_profile
move "%thunderbird_dir%\thunderbird_profile.exe" "%temp%"
EXIT


now you also need 2 text files that have your comments:

c_thunderbird.txt
;The comment below contains SFX script commands

Path=%PROGRAMFILES%\Mozilla Thunderbird\defaults\profile
SavePath
Silent=1
Overwrite=1


and

c_firefox.txt
;The comment below contains SFX script commands

Path=%PROGRAMFILES%\Mozilla Firefox\defaults\profile
SavePath
Silent=1
Overwrite=1


These two batches reside in the same folder as my firefox and thunderbird folders. I just run them right before making my new cd and I have updated profiles for both.

Enjioy :)

]Bonkers[

This post has been edited by ]Bonkers[: 19 November 2005 - 01:54 PM


#3 User is offline   anick 

  • Group: Members
  • Posts: 1
  • Joined: 13-November 05

Posted 19 November 2005 - 09:04 AM

for bad english:

Great...

This is mine...
CLS
@ECHO OFF
COLOR 70
MODE CON COLS=44 LINES=14
set rar="%temp%\WinRAR\RAR.exe"
cd "%APPDATA%\Mozilla\Firefox\Profiles\*default"
set fxprofile_dir=%CD%
del /f /q "%fxprofile_dir%\cookies.txt"
del /f /q "%fxprofile_dir%\cookies-*.txt"
del /f /q "%fxprofile_dir%\Cache\*"
cd "%APPDATA%\Mozilla\Firefox\Profiles"
set firefox_dir=%CD%
%rar% a -k -z"%temp%\c_firefox.txt" -r -sfx BackupFirefox
move "%firefox_dir%\BackupFirefox.exe" "%SystemDrive%\"
RD /S /Q %Temp%\WinRAR
del /S /Q "%temp%\c_firefox.txt"
cls
ECHO  ------------------------------------------
ECHO	Mozilla Firefox Profile Backup Program
ECHO  ------------------------------------------
ECHO.
ECHO	*  Backuping Firefox profile...
ECHO	*  Delete Cookies & Cache ...
ECHO	*  Compressing profile...
ECHO	*  Moving backup file to C:...
ECHO.
ECHO	*  Profile backup complete...
ECHO.
ECHO.						  Powed by  anick
ECHO  ------------------------------------------
pause
EXIT


see here :)

This post has been edited by anick: 19 November 2005 - 01:20 PM


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