Author Topic: Script to backup CFP V3 Alpha settings  (Read 4788 times)

Offline panic

  • Global Moderator
  • Comodo's Hero
  • *****
  • Posts: 11815
  • Linux is free only if your time is worthless.;-)
Script to backup CFP V3 Alpha settings
« on: July 26, 2007, 04:09:59 PM »
G'day,

Attached is a script for backing up the rulesets and configuration for CFPV3. It is based on V1.5 of Rottys CFP backup script.

The code for the CFPV3 script is as follows

******************************************

[ at ]  echo off
cls
echo *****************************
echo The settings are backed up to %SYSTEMDRIVE%\Documents and Settings\%USERNAME%\DESKTOP\CFP3Backup\CFPRUles.REG
echo Merge the "CFPrules.reg" file back, to restore settings
echo *****************************
echo To start press enter. To quit press the "x" button on this window
pause >nul:

cls
if not exist "%SYSTEMDRIVE%\Documents and Settings\%USERNAME%\DESKTOP\CFP3Backup" goto :new
goto :archive

:archive
echo Clearing oldest backup - please wait
del "%SYSTEMDRIVE%\Documents and Settings\%USERNAME%\DESKTOP\CFP3Backup\Prior\CFPRUles.REG" >nul:
echo Storing previous backup - please wait ...
copy "%SYSTEMDRIVE%\Documents and Settings\%USERNAME%\DESKTOP\CFP3Backup\CFPRUles.REG" "%SYSTEMDRIVE%\Documents and Settings\%USERNAME%\DESKTOP\CFP3Backup\Prior\CFPRUles.REG"
echo Archiving current rule set - please wait ...
REGEDIT /E "%SYSTEMDRIVE%\Documents and Settings\%USERNAME%\DESKTOP\CFP3Backup\CPFRUles.REG" "HKEY_LOCAL_MACHINE\SYSTEM\Software\Comodo\Firewall Pro"
goto :end

:new
cls
echo.
echo Creating folders - please wait ...
echo.
md "%SYSTEMDRIVE%\Documents and Settings\%USERNAME%\DESKTOP\CFP3Backup"
md "%SYSTEMDRIVE%\Documents and Settings\%USERNAME%\DESKTOP\CFP3Backup\Prior"
echo Archiving registry keys - please wait ...
REGEDIT /E "%SYSTEMDRIVE%\Documents and Settings\%USERNAME%\DESKTOP\CFP3Backup\CPFRUles.REG" "HKEY_LOCAL_MACHINE\SYSTEM\Software\Comodo\Firewall Pro"
copy "%SYSTEMDRIVE%\Documents and Settings\%USERNAME%\DESKTOP\CFP3Backup\CFPRUles.REG" "%SYSTEMDRIVE%\Documents and Settings\%USERNAME%\DESKTOP\CFP3Backup\Prior\CFPRUles.REG" >nul:
goto :end

:end
echo DONE!!!
echo Press any key to end
pause >nul:

**********************************************

Hope this helps,
Ewen :-)


EDIT : minor mod to code. modified script attached


[attachment deleted by admin]
« Last Edit: August 12, 2007, 05:31:06 AM by panic »
As your mums would say, "If you can't play nice with all the other kiddies, go home".
All users are asked to please read and abide by the  Comodo Forum Policy.
If you can't conform, don't use the forum.

Offline perigee

  • Newbie
  • *
  • Posts: 24
Re: Script to backup CFP V3 Alpha settings
« Reply #1 on: August 12, 2007, 01:44:57 AM »
       Hi Panic, thank you for the script. But, shouldn't the line of code in the creating folder area:

md "%SYSTEMDRIVE%\Documents and Settings\%USERNAME%\DESKTOP\CPFBackup"


       actually be:

md "%SYSTEMDRIVE%\Documents and Settings\%USERNAME%\DESKTOP\CPF3Backup"


............thanks again..............



Offline panic

  • Global Moderator
  • Comodo's Hero
  • *****
  • Posts: 11815
  • Linux is free only if your time is worthless.;-)
Re: Script to backup CFP V3 Alpha settings
« Reply #2 on: August 12, 2007, 05:32:16 AM »
Thanks for that - fat fingers strike again! :)

I've modified the sample code and the attached script file accordingly. I've also changed "CPF" to "CFP" fopr cerrectness.

Thanks again,
Ewen :-)
As your mums would say, "If you can't play nice with all the other kiddies, go home".
All users are asked to please read and abide by the  Comodo Forum Policy.
If you can't conform, don't use the forum.

Offline panic

  • Global Moderator
  • Comodo's Hero
  • *****
  • Posts: 11815
  • Linux is free only if your time is worthless.;-)
Re: Script to backup CFP V3 Alpha settings
« Reply #3 on: August 12, 2007, 07:09:57 PM »
G'day,

Attached is a script for backing up the rulesets and configuration for CFPV3. It is based on V1.5 of Rottys CFP backup script.

The code for the CFPV3 script is as follows

******************************************

[ at ]  echo off
cls
echo *****************************
echo The settings are backed up to %SYSTEMDRIVE%\Documents and Settings\%USERNAME%\DESKTOP\CFP3Backup\CFPRUles.REG
echo Merge the "CFPrules.reg" file back, to restore settings
echo *****************************
echo To start press enter. To quit press the "x" button on this window
pause >nul:

cls
if not exist "%SYSTEMDRIVE%\Documents and Settings\%USERNAME%\DESKTOP\CFP3Backup" goto :new
goto :archive

:archive
echo Clearing oldest backup - please wait
del "%SYSTEMDRIVE%\Documents and Settings\%USERNAME%\DESKTOP\CFP3Backup\Prior\CFPRUles.REG" >nul:
echo Storing previous backup - please wait ...
copy "%SYSTEMDRIVE%\Documents and Settings\%USERNAME%\DESKTOP\CFP3Backup\CFPRUles.REG" "%SYSTEMDRIVE%\Documents and Settings\%USERNAME%\DESKTOP\CFP3Backup\Prior\CFPRUles.REG"
echo Archiving current rule set - please wait ...
REGEDIT /E "%SYSTEMDRIVE%\Documents and Settings\%USERNAME%\DESKTOP\CFP3Backup\CPFRUles.REG" "HKEY_LOCAL_MACHINE\SYSTEM\Software\Comodo\Firewall Pro"
goto :end

:new
cls
echo.
echo Creating folders - please wait ...
echo.
md "%SYSTEMDRIVE%\Documents and Settings\%USERNAME%\DESKTOP\CFP3Backup"
md "%SYSTEMDRIVE%\Documents and Settings\%USERNAME%\DESKTOP\CFP3Backup\Prior"
echo Archiving registry keys - please wait ...
REGEDIT /E "%SYSTEMDRIVE%\Documents and Settings\%USERNAME%\DESKTOP\CFP3Backup\CPFRUles.REG" "HKEY_LOCAL_MACHINE\SYSTEM\Software\Comodo\Firewall Pro"
copy "%SYSTEMDRIVE%\Documents and Settings\%USERNAME%\DESKTOP\CFP3Backup\CFPRUles.REG" "%SYSTEMDRIVE%\Documents and Settings\%USERNAME%\DESKTOP\CFP3Backup\Prior\CFPRUles.REG" >nul:
goto :end

:end
echo DONE!!!
echo Press any key to end
pause >nul:

**********************************************

Hope this helps,
Ewen :-)


EDIT : minor mod to code. modified script attached


[attachment deleted by admin]
As your mums would say, "If you can't play nice with all the other kiddies, go home".
All users are asked to please read and abide by the  Comodo Forum Policy.
If you can't conform, don't use the forum.

Offline perigee

  • Newbie
  • *
  • Posts: 24
Re: Script to backup CFP V3 Alpha settings
« Reply #4 on: August 15, 2007, 12:59:13 AM »
Hi again, panic
     The new script backed up the settings OK, but does not archive to the Prior directory. I found 2 references to CPFRUles.REG that should be changed to CFPRUles.REG.......per your mod to the code.

1st in :   Archiving current rule set
2nd in :  Archiving registry keys

      I guess this happened when you changed the CPFs to CFPs...........anyway I made this change to the .bat file and it works just fine with V3 Beta......excuse me for being such a pest.
      No one else reported this ??????
........thanks again

P.S. The topic discription implys this script is for V3 ALPHA , but it also works with V3 BETA.
       Maybe the topic discription should reflect that. Oh well, just a thought.
« Last Edit: August 15, 2007, 01:41:14 AM by perigee »

Offline panic

  • Global Moderator
  • Comodo's Hero
  • *****
  • Posts: 11815
  • Linux is free only if your time is worthless.;-)
Re: Script to backup CFP V3 Alpha settings
« Reply #5 on: August 15, 2007, 02:04:08 AM »
Thanks for that and my apologies for not getting all the changes right.

In a way, this script becomes redundant now the beta is out, as it handles backups natively and for multiple configurations as well.

Cheers,
Ewen :-)
As your mums would say, "If you can't play nice with all the other kiddies, go home".
All users are asked to please read and abide by the  Comodo Forum Policy.
If you can't conform, don't use the forum.

 

Free Endpoint Protection
Seo4Smf 2.0 © SmfMod.Com Smf Destek