Welcome, Guest. Please login or register.
September 06, 2008, 04:53:37 PM

Login with username, password and session length

189131 Posts
22038 Topics
52852 Members

Latest Member: maden

Search:     Advanced search | Tag Cloud
+  Welcome to the Comodo Forum
|-+  Desktop Security Products
| |-+  Comodo Firewall
| | |-+  Help for v2
| | | |-+  Script to Backup CPF v2.4 firewall settings
« previous next »
Pages: 1 [2] 3 4 ... 11 Go Down Print
Author Topic: Script to Backup CPF v2.4 firewall settings  (Read 52365 times)
panic
Global Moderator
Comodo's Hero
*****
Offline Offline

Posts: 5372


... and I say to myself, "What a wonderful world"


« Reply #15 on: September 26, 2006, 08:51:23 AM »

Ewen you could regret the 'don't worry about silly questions' bit.
As I see it the two two files here do the same thing, they just store the backup in different places?

What I'm not sure about (haven't a clue about actually!) is when I'd use it.  If I'm running XP and have the option to use System Restore in event of a melt down would this not restore the CPF settings as well- assuming anything was able to be rescued?  I don't have total faith in Sys Restore but it has saved me from a problems mainly with dodgy software, and the last time I had any PC problems was a few years ago now- oh no what's that noise...

If I'd be saving the data in case of a drive failure would I not have to re-install all my software on a new drive which would have a new registery with completely different entries, etc.  I'm not trying to say there is no use for it I'm just trying to find out when I would use it.

You're right about the house insurance tho', but damn we've still got it!

You're correct about the two versions, just a change in output location.

The best reason to backup using this is if you have created custom rules and want to retain them if you have to reinstall the firewall, or if you want to have identical configurations on multiple machines. they will restore OK onto a new install because it will create any registry keys it needs if they aren't there when its imported.

Hope this helps,
Ewen :-)
Logged

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 don't like it, don't use the forum.
TerDale
Comodo Member
**
Offline Offline

Posts: 29


« Reply #16 on: September 29, 2006, 01:08:02 PM »

Hi,

Thanks to both of you for this script, nice idea.

However, it can't work as is, if you are logged in with a regular account (ie. non admin) as everyone should (and even if M$ didn't do things to make it easy). Indeed, even if you have a good FW (well, very good shall I say!  Wink ) and an equally good AV (not to say an anti-spyware), there is no exemption to run as a regular account, and that will be enforced on Vista BTW.

So, I'd suggest that the script be amended to use %ALLUSERSPROFILE%, instead of %SYSTEMROOT% or %SYSTEMDRIVE%. Indeed, in both cases, a regular user is not allowed to create a folder. OTOH, %ALLUSERSPROFILE% (usually) maps to "%SYSTEMDRIVE%\Documents and Settings\All Users" that is readable & writable by all users of your computer.
Doing so will allow any user to use the script to backup CPF settings.

OTOH, to restore settings, only an admin will have rights to restore registry settings. But backing up should be done peridocally, while restoring is only done very sporadically


Logged
Rotty
Global Moderator
Comodo's Hero
*****
Offline Offline

Posts: 793

http://www.venganza.org/ - Noodly Appendage


« Reply #17 on: September 29, 2006, 08:58:14 PM »

Ok, i will implement what you have said, but i will send it to panic to test it, just to make sure.

Ok, made the changes and it has been tested, the original post has been updated.

Cheers, rotty
« Last Edit: September 30, 2006, 07:39:23 PM by Rotty » Logged

The opinions expressed in my posts are my own. 
They do NOT necessarily represent or reflect the views of my employer.
shirike
Newbie
*
Offline Offline

Posts: 4


« Reply #18 on: October 18, 2006, 02:28:41 PM »

Quote
Archiving current rule set - please wait ...
'REGEDIT' is not recognized as an internal or external command,
operable program or batch file.
DONE!!!
Press any key to end

Using v1.1 - what's going wrong? Sad
Logged
panic
Global Moderator
Comodo's Hero
*****
Offline Offline

Posts: 5372


... and I say to myself, "What a wonderful world"


« Reply #19 on: October 19, 2006, 02:43:43 AM »

Using v1.1 - what's going wrong? Sad

Using V1.1 of what? CPF? The script is designed for V2.2 and upwards. If you are using CPF V1.1, we are sorry, but we didn't think anyone would still be on that version.

Cheers,
Ewen :-)
Logged

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 don't like it, don't use the forum.
Frankster
Comodo Member
**
Offline Offline

Posts: 32


« Reply #20 on: October 19, 2006, 02:59:57 AM »

i think he means v1.1 of the scripts... well, but i am not a native english-speaker. Wink
Logged
panic
Global Moderator
Comodo's Hero
*****
Offline Offline

Posts: 5372


... and I say to myself, "What a wonderful world"


« Reply #21 on: October 19, 2006, 03:11:06 AM »

i think he means v1.1 of the scripts... well, but i am not a native english-speaker. Wink

DOH!

If you are using Windows 2000 or Windows XP and the OS is installed in a reasonably "normal" manner, then there's no reason why the script won't work, unless your pathing variables aren't standard.

You could try editing the script and changing "REGEDIT /E" to "C:\WINDOWS\REGEDIT /E", on the proviso that your Windows OS is installed on your C: drive.


Revised script with explicit pathing is below.

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

[ at ] echo off
cls
echo *****************************
echo The settings are backed up to %SYSTEMDRIVE%\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%\CPFBackup" goto :new
goto :archive

:archive
echo Clearing oldest backup - please wait
del %SYSTEMDRIVE%\CPFBackup\Prior\CPFRUles.REG >nul:
echo Storing previous backup - please wait ...
copy %SYSTEMDRIVE%\CPFBackup\CPFRUles.REG %SYSTEMDRIVE%\CPFBackup\Prior\CPFRUles.REG
echo Archiving current rule set - please wait ...
REGEDIT /E %SYSTEMDRIVE%\CPFBackup\CPFRUles.REG "HKEY_LOCAL_MACHINE\SYSTEM\Software\Comodo\Personal Firewall"
goto :end

:new
cls
echo.
echo Creating folders - please wait ...
echo.
md %SYSTEMDRIVE%\CPFBackup
md %SYSTEMDRIVE%\CPFBackup\Prior
echo Archiving registry keys - please wait ...
REGEDIT /E %SYSTEMDRIVE%\CPFBackup\CPFRUles.REG "HKEY_LOCAL_MACHINE\SYSTEM\Software\Comodo\Personal Firewall"
copy %SYSTEMDRIVE%\CPFBackup\CPFRUles.REG %SYSTEMDRIVE%\CPFBackup\Prior\CPFRUles.REG >nul:
goto :end

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

This is the Script for "CPFBackup.zip" (Version 1.2) it uses %ALLUSERSPROFILE% IE. C:\Documents and settings\Allusers\


Code:
[ at ] echo off
cls
echo *****************************
echo The settings are backed up to %ALLUSERSPROFILE%\CPFBackup\CPFRUles.REG
echo Merge the "CPFrules.reg" file back, to restore settings
echo.
echo *** THIS IS A PRIVATE REVISION FOR A SINGLE INSTANCE BUG FIX - EB ***
echo.
echo *****************************
echo To start press enter. To quit press the "x" button on this window
pause >nul:

cls
if not exist "%ALLUSERSPROFILE%\CPFBackup" goto :new
goto :archive

:archive
echo Clearing oldest backup - please wait
del %ALLUSERSPROFILE%\CPFBackup\Prior\CPFRUles.REG >nul:
echo Storing previous backup - please wait ...
copy %ALLUSERSPROFILE%\CPFBackup\CPFRUles.REG %ALLUSERSPROFILE%\CPFBackup\Prior\CPFRUles.REG
echo Archiving current rule set - please wait ...
C:\WINDOWS\REGEDIT.EXE /E %ALLUSERSPROFILE%\CPFBackup\CPFRUles.REG "HKEY_LOCAL_MACHINE\SYSTEM\Software\Comodo\Personal Firewall"
goto :end

:new
cls
echo.
echo Creating folders - please wait ...
echo.
md %ALLUSERSPROFILE%\CPFBackup
md %ALLUSERSPROFILE%\CPFBackup\Prior
echo Archiving registry keys - please wait ...
C:\WINDOWS\REGEDIT.EXE /E %ALLUSERSPROFILE%\CPFBackup\CPFRUles.REG "HKEY_LOCAL_MACHINE\SYSTEM\Software\Comodo\Personal Firewall"
copy %ALLUSERSPROFILE%\CPFBackup\CPFRUles.REG %ALLUSERSPROFILE%\CPFBackup\Prior\CPFRUles.REG >nul:
goto :end

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

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

If this doesn't work, do a Windows search for REGAEDIT.EXE and let us know where it is on your system.

Hope this helps,
Ewen :-)


Logged

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 don't like it, don't use the forum.
shirike
Newbie
*
Offline Offline

Posts: 4


« Reply #22 on: October 24, 2006, 02:02:07 PM »

Used v1.1 revised script in the same folder as REDEDIT.EXE and it worked Smiley
Logged
panic
Global Moderator
Comodo's Hero
*****
Offline Offline

Posts: 5372


... and I say to myself, "What a wonderful world"


« Reply #23 on: October 24, 2006, 05:56:05 PM »

Used v1.1 revised script in the same folder as REDEDIT.EXE and it worked Smiley

it would seem that your issue is caused by the system environment variables not being set, or at least not containing the path info for c:\windows. this is worth looking into.

ewen :-)
Logged

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 don't like it, don't use the forum.
maniac2003
Comodo Member
**
Offline Offline

Posts: 39


« Reply #24 on: October 29, 2006, 09:43:04 AM »

The 1.1 backup method worked for me so far.
Want to try out some other security software, don't I'll be back  Comodo Rocks

Trend Micro IS 2007 sucks ! My notebook sure was sloooow.
So back to NOD32 and CPF  110 Percent

But when restoring the rules (importing the .reg file). It says that it couldn't import it all because some of the registry keys are in use  Huh
For Firefox I had to choose allow again, so importing didn't work for me.
Or am I doing something wrong.
« Last Edit: October 29, 2006, 12:27:02 PM by maniac2003 » Logged

Quote from Panic "The only truly secure computer is one that has no power connected to it, no means of human interaction, no input devices, no output devices and is encased in concrete, stuffed into a locked chest and sunk at sea."
panic
Global Moderator
Comodo's Hero
*****
Offline Offline

Posts: 5372


... and I say to myself, "What a wonderful world"


« Reply #25 on: October 29, 2006, 11:21:16 PM »

The 1.1 backup method worked for me so far.
Want to try out some other security software, don't I'll be back  Comodo Rocks

Trend Micro IS 2007 sucks ! My notebook sure was sloooow.
So back to NOD32 and CPF  110 Percent

But when restoring the rules (importing the .reg file). It says that it couldn't import it all because some of the registry keys are in use  Huh
For Firefox I had to choose allow again, so importing didn't work for me.
Or am I doing something wrong.

When restoring, you need to got to SECURITY - ADVANCED - MISCELLANEOUS and turn off "Protect own registry keys" before importing.

Rotty, can you add this as a note to the stickey topic. Thanks in advance.

Hope this helps,
Ewen :-)
Logged

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 don't like it, don't use the forum.
twl845
Comodo's Hero
*****
Offline Offline

Posts: 203



« Reply #26 on: October 31, 2006, 09:32:08 AM »

When I used ZA I could back up my settings in My Documents each time I made some changes. This was accomplished by naming the backup and  clicking a button on the overview page if I remember right.  Grin  A nice simple method would be best.
 110 Percent
« Last Edit: October 31, 2006, 09:40:07 AM by twl845 » Logged
Rotty
Global Moderator
Comodo's Hero
*****
Offline Offline

Posts: 793

http://www.venganza.org/ - Noodly Appendage


« Reply #27 on: October 31, 2006, 05:43:41 PM »

Yes, using a programming language such as C# or VB6 (Easier to program LOL), Delphi then a user interface would be possible.   I would have to consult Panic on this as we'd have to find a language that we both have access to.

I have considered doing that i will do that if COMODO do not add it in the next version.

Also the need to close COMODO to write the settings back will be a problem that HAS to exist, otherwise if i found a way around it then i would have to tell them(I'm nice  Tongue) and they would have to patch it  Tongue (-: .

This is all effected by how much time we have on our hands of course.

cheers, rotty
« Last Edit: October 31, 2006, 05:47:33 PM by Rotty » Logged

The opinions expressed in my posts are my own. 
They do NOT necessarily represent or reflect the views of my employer.
maniac2003
Comodo Member
**
Offline Offline

Posts: 39


« Reply #28 on: November 04, 2006, 04:41:33 AM »

When restoring, you need to got to SECURITY - ADVANCED - MISCELLANEOUS and turn off "Protect own registry keys" before importing.

Rotty, can you add this as a note to the stickey topic. Thanks in advance.

Hope this helps,
Ewen :-)


Thanks for the help, everything imported ok now.  Bounce
Logged

Quote from Panic "The only truly secure computer is one that has no power connected to it, no means of human interaction, no input devices, no output devices and is encased in concrete, stuffed into a locked chest and sunk at sea."
chamberk
Newbie
*
Offline Offline

Posts: 4


« Reply #29 on: November 04, 2006, 07:04:03 AM »

Ran across this tonight (err -this morning!). Worked like a charm though I did have to hard-code the environment variables, which was no problem because I wanted the backup on an external drive anyway.

Keep up the great work ya'll! I am truely impressed at the quality of CPF! My "learning curve" merely required the flash tutorial to get moving. Well done.

Rgds.
Logged
Tags:
Pages: 1 [2] 3 4 ... 11 Go Up Print 
« previous next »
Jump to:  

SSL Firewall
Page created in 0.154 seconds with 20 queries.
Powered by SMF 1.1.5 | SMF © 2006, Simple Machines LLC
Seo4Smf v0.2 © Webmaster's Talks
Design by 7dana.com