NOTE: This script is provided as-is without any warranty. The makers accept no liability in the event something should go wrong or the event of data loss or any other problems.
Comodo firewall version 2.4 seems to be a little bit “dubious” with the script, we are waiting for response about what is causing the problem of the settings not being backed up properly when the firewall is NOT set to “Allow all” and are waiting for a reply. The desired backup system will be one integrated into the firewall itself which they are working on.
Panic and I have created a script that backup’s up the CPF rules to a .reg file so that people do not have to go through their registry to backup the settings.
What does everyone think about this idea.
I have 3 versions, each is explained, each works just as well, choose the one that suites what you prefer.
NOTE: When restoring, you need to go to SECURITY - ADVANCED - MISCELLANEOUS and turn off “Protect own registry keys” before importing.
You also need to set the firewall to “allow all”.
Reboot your PC!
This is the Script for “CPFBackup.zip” (Version 1.0):
[ at ] echo off
cls
echo *****************************
echo The settings are backed up to %SYSTEMROOT%\CPFBackup\CPFRUles.REG
echo Merge the "CPFrules.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 "%SYSTEMROOT%\CPFBackup" goto :new
goto :archive
:archive
echo Clearing oldest backup - please wait
del %SYSTEMROOT%\CPFBackup\Prior\CPFRUles.REG >nul:
echo Storing previous backup - please wait ...
copy %SYSTEMROOT%\CPFBackup\CPFRUles.REG %SYSTEMROOT%\CPFBackup\Prior\CPFRUles.REG
echo Archiving current rule set - please wait ...
REGEDIT /E %SYSTEMROOT%\CPFBackup\CPFRUles.REG "HKEY_LOCAL_MACHINE\SYSTEM\Software\Comodo\Personal Firewall"
goto :end
:new
cls
echo.
echo Creating folders - please wait ...
echo.
md %SYSTEMROOT%\CPFBackup
md %SYSTEMROOT%\CPFBackup\Prior
echo Archiving registry keys - please wait ...
REGEDIT /E %SYSTEMROOT%\CPFBackup\CPFRUles.REG "HKEY_LOCAL_MACHINE\SYSTEM\Software\Comodo\Personal Firewall"
copy %SYSTEMROOT%\CPFBackup\CPFRUles.REG %SYSTEMROOT%\CPFBackup\Prior\CPFRUles.REG >nul:
goto :end
:end
echo DONE!!!
echo Press any key to end
pause >nul:
VERSION 1.5: The best of all, environment variables fixed.
[ at ] echo off
cls
echo *****************************
echo The settings are backed up to %SYSTEMDRIVE%\Documents and Settings\%USERNAME%\DESKTOP\CPFBackup\CPFRUles.REG
echo Merge the "CPFrules.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\CPFBackup" goto :new
goto :archive
:archive
echo Clearing oldest backup - please wait
del "%SYSTEMDRIVE%\Documents and Settings\%USERNAME%\DESKTOP\CPFBackup\Prior\CPFRUles.REG" >nul:
echo Storing previous backup - please wait ...
copy "%SYSTEMDRIVE%\Documents and Settings\%USERNAME%\DESKTOP\CPFBackup\CPFRUles.REG" "%SYSTEMDRIVE%\Documents and Settings\%USERNAME%\DESKTOP\CPFBackup\Prior\CPFRUles.REG"
echo Archiving current rule set - please wait ...
REGEDIT /E "%SYSTEMDRIVE%\Documents and Settings\%USERNAME%\DESKTOP\CPFBackup\CPFRUles.REG" "HKEY_LOCAL_MACHINE\SYSTEM\Software\Comodo\Personal Firewall"
goto :end
:new
cls
echo.
echo Creating folders - please wait ...
echo.
md "%SYSTEMDRIVE%\Documents and Settings\%USERNAME%\DESKTOP\CPFBackup"
md "%SYSTEMDRIVE%\Documents and Settings\%USERNAME%\DESKTOP\CPFBackup\Prior"
echo Archiving registry keys - please wait ...
REGEDIT /E "%SYSTEMDRIVE%\Documents and Settings\%USERNAME%\DESKTOP\CPFBackup\CPFRUles.REG" "HKEY_LOCAL_MACHINE\SYSTEM\Software\Comodo\Personal Firewall"
copy "%SYSTEMDRIVE%\Documents and Settings\%USERNAME%\DESKTOP\CPFBackup\CPFRUles.REG" "%SYSTEMDRIVE%\Documents and Settings\%USERNAME%\DESKTOP\CPFBackup\Prior\CPFRUles.REG" >nul:
goto :end
:end
echo DONE!!!
echo Press any key to end
pause >nul:
cheers, rotty
I’m adding a Swedish version of the script. / AOwL
There is now a Spanish version, courtesy of ferarg
There is now a Italian version, courtesy of pandlouk
There is now a French version, courtesy of rip_pit
[attachment deleted by admin]