Welcome to the Comodo Forum
Welcome,
Guest
. Please
login
or
register
.
July 25, 2008, 06:18:59 PM
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
177076
Posts
20936
Topics
50764
Members
Latest Member:
battousai386
more news...
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
...
11
Author
Topic: Script to Backup CPF v2.4 firewall settings (Read 49496 times)
Rotty
Global Moderator
Comodo's Hero
Offline
Posts: 793
http://www.venganza.org/ - Noodly Appendage
Script to Backup CPF v2.4 firewall settings
«
on:
September 13, 2006, 03:14:25 AM »
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):
Code:
[ 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.
Code:
[ 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
«
Last Edit: January 21, 2008, 03:42:23 AM by Rotty
»
Logged
The opinions expressed in my posts are my own.
They do NOT necessarily represent or reflect the views of my employer.
Bluesman
Comodo's Hero
Offline
Posts: 542
Only Amiga Makes It Possible
Re: Script to Backup CPF firewall settings
«
Reply #1 on:
September 13, 2006, 08:17:34 AM »
Quote from: Rotty on September 13, 2006, 03:14:25 AM
What does everyone think about this idea.
Sounds great! I will test it later tonight!
Logged
"The blues are the roots, everything else is the fruits" -Willie Dixon
pudelein
Comodo Loves me
Offline
Posts: 114
Re: Script to Backup CPF firewall settings
«
Reply #2 on:
September 13, 2006, 08:17:57 AM »
Rotty and Panic,
The script looks useful for those not caring to mess directly in the Registry. It is a bit inflexible, but could be edited by anyone wanting to change the location of the archive. On the other hand, if the next version of CPF (2.4?) provides an internal mechanism for saving the settings, the script could be unnecessary, but that's life!
Logged
panic
Global Moderator
Comodo's Hero
Offline
Posts: 5163
... and I say to myself, "What a wonderful world"
Re: Script to Backup CPF firewall settings
«
Reply #3 on:
September 13, 2006, 08:41:42 AM »
Quote from: pudelein on September 13, 2006, 08:17:57 AM
Rotty and Panic,
The script looks useful for those not caring to mess directly in the Registry. It is a bit inflexible, but could be edited by anyone wanting to change the location of the archive. On the other hand, if the next version of CPF (2.4?) provides an internal mechanism for saving the settings, the script could be unnecessary, but that's life!
If enough people want it, it is easy enough to vary the destination through a %X parameter that can be passed to the script at runtime. e.g. "backup g:". If we wanted to get messy enough, the destination folder could be specified through a second parameter. Bear in mind, though, that any recovery procedure would need to use the exact parameters used to create the backup.
Also, people who don't/can't mess with the registry may not appreciate the inflexibility, but your point is taken.
cheers,
ewen :-0
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.
Rotty
Global Moderator
Comodo's Hero
Offline
Posts: 793
http://www.venganza.org/ - Noodly Appendage
Re: Script to Backup CPF firewall settings
«
Reply #4 on:
September 13, 2006, 07:56:36 PM »
Yes, with the update taking care of this, it may not be necessary. But who knows.
(One of the considerations in making it were that we would not use a language that requires the user to have the program installed, and cannot be edited in it's compiled format IE. VB6, C# etc. So that the user can edit the program if they need/want to.
cheers, rotty
«
Last Edit: September 13, 2006, 08:59:34 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.
marc57
Guest
Re: Script to Backup CPF firewall settings
«
Reply #5 on:
September 14, 2006, 12:22:30 AM »
Rotty and Panic,
Thanks for all the work you put into this, I'll give it a try.
Logged
Rotty
Global Moderator
Comodo's Hero
Offline
Posts: 793
http://www.venganza.org/ - Noodly Appendage
Re: Script to Backup CPF firewall settings
«
Reply #6 on:
September 15, 2006, 03:36:15 AM »
marc57, did you try it, how did it go?
Trying to gauge whether people are using this, so maybe this thread can be pinned, and i can boost my ego, by having a thread in my name pinned LOL
cheers, rotty
Logged
The opinions expressed in my posts are my own.
They do NOT necessarily represent or reflect the views of my employer.
marc57
Guest
Re: Script to Backup CPF firewall settings
«
Reply #7 on:
September 15, 2006, 03:51:37 AM »
Quote from: Rotty on September 15, 2006, 03:36:15 AM
marc57, did you try it, how did it go?
Trying to gauge whether people are using this, so maybe this thread can be pinned, and i can boost my ego, by having a thread in my name pinned LOL
cheers, rotty
Hey rotty, It worked fine for me.
Logged
Bluesman
Comodo's Hero
Offline
Posts: 542
Only Amiga Makes It Possible
Re: Script to Backup CPF firewall settings
«
Reply #8 on:
September 15, 2006, 03:57:30 AM »
Quote from: marc57 on September 15, 2006, 03:51:37 AM
Hey rotty, It worked fine for me.
The script work just fine here also!
Logged
"The blues are the roots, everything else is the fruits" -Willie Dixon
Rotty
Global Moderator
Comodo's Hero
Offline
Posts: 793
http://www.venganza.org/ - Noodly Appendage
Re: Script to Backup CPF firewall settings
«
Reply #9 on:
September 15, 2006, 04:21:23 AM »
Cool, thanks for responding.
cheers, rotty
Logged
The opinions expressed in my posts are my own.
They do NOT necessarily represent or reflect the views of my employer.
munckman
Comodo Family Member
Offline
Posts: 84
Re: Script to Backup CPF firewall settings
«
Reply #10 on:
September 25, 2006, 12:35:55 AM »
Quote from: Rotty on September 15, 2006, 03:36:15 AM
marc57, did you try it, how did it go?
Trying to gauge whether people are using this, so maybe this thread can be pinned, and i can boost my ego, by having a thread in my name pinned LOL
cheers, rotty
Looks like you got a Sticky.
It backs up fine. Just a quick question though. When restoring will the backup reg file completely overwrite the existing reg entries? I would think it completely overwrites but just want to be sure.
Thanks for this little gem!
Logged
panic
Global Moderator
Comodo's Hero
Offline
Posts: 5163
... and I say to myself, "What a wonderful world"
Re: Script to Backup CPF firewall settings
«
Reply #11 on:
September 25, 2006, 12:48:09 AM »
Quote from: munckman on September 25, 2006, 12:35:55 AM
Looks like you got a Sticky.
It backs up fine. Just a quick question though. When restoring will the backup reg file completely overwrite the existing reg entries? I would think it completely overwrites but just want to be sure.
Thanks for this little gem!
Yep. Overwrites existing values in the identically named key.
Glad you like it.
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.
whodee
Newbie
Offline
Posts: 13
Re: Script to Backup CPF firewall settings
«
Reply #12 on:
September 26, 2006, 07:37:06 AM »
OK take a deep breath... don't know if I should admit to not knowing this but someone's got to do it for me types who don't know a lot.
When, why and how should we use either of these? Would it make more sense to store the file on an external drive?
All answers greatfully received. Thanks
Logged
panic
Global Moderator
Comodo's Hero
Offline
Posts: 5163
... and I say to myself, "What a wonderful world"
Re: Script to Backup CPF firewall settings
«
Reply #13 on:
September 26, 2006, 07:48:41 AM »
Quote from: whodee on September 26, 2006, 07:37:06 AM
OK take a deep breath... don't know if I should admit to not knowing this but someone's got to do it for me types who don't know a lot.
When, why and how should we use either of these? Would it make more sense to store the file on an external drive?
All answers greatfully received. Thanks
Hey whodee,
This is used IF you want to take a backup of your firewall rules and settings. There's no real reason to run this, but then there's no real reason to have house insurance, is there? LOL
Definitely store the REG files on an external source as well as the default output folder. No sense having your data backup on the same drive that's about to crash, is there?
Don't worry about asking what you think are silly questions. The only really dumb question is the one that never gets asked.
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.
whodee
Newbie
Offline
Posts: 13
Re: Script to Backup CPF firewall settings
«
Reply #14 on:
September 26, 2006, 08:39:11 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!
Logged
Tags:
Pages:
[
1
]
2
3
...
11
« previous
next »
Jump to:
Please select a destination:
-----------------------------
** New to the Comodo Forum? Start Here! **
-----------------------------
=> New Member Information
-----------------------------
Want to help Comodo?
-----------------------------
=> Help Spread the Word - Official Comodo banners and logos
=> How can you help Comodo? (Please we do need you!)
===> Help spread the word! (Please read and help)
===> Comodo website issues for submitting website problems only
=> Please tell us your views and Vote here!
-----------------------------
General Category
-----------------------------
=> Melih's Corner - CEO Talk/Discussions/Blog
=> Which Product do you want Comodo to develop next?
=> General Discussion (off topic) Anything and everything...
===> Member Confessions :-)
===> Funny Photos :-)
===> Cool Stuff
-----------------------------
Desktop Security Products
-----------------------------
=> Comodo Firewall
===> Feedback/Comments/Announcements/News
===> Leak Testing/Attacks/Vulnerability Research
===> Help for v3
===> Help for v2
===> Frequently Asked Questions (FAQ) for Comodo firewall
===> Comodo Firewall Translations
===> Bug Reports
=> Comodo Anti-Viruspyware (CAVS)
===> Help for Comodo AntiVirus
===> FAQ for Comodo Anti-ViruSpyware
===> Feedback/Comments/Announcements/News about CAVS
===> Virus/Malware Removal Assistance
=> Comodo BOClean Anti-Malware
===> Announcements
===> Comodo BOClean Anti-Malware FAQ
=> Comodo DiskShield
=> Comodo Disk Encryption
=> Comodo Secure Email (CSE) Product
===> CSE Beta Corner
===> Frequently Asked Questions (FAQ)
===> Feedback/Comments/Announcements/News about CSE
===> Bug Reports
===> Help for Comodo SecureEmail
=> Comodo Memory Firewall(Buffer Overflow Protection)
===> Help
===> Frequently Asked Questions (Comodo Memory Firewall)
===> Feedback/Comments/Announcements/News
=> Comodo TrustConnect - Securing the Wireless world!
=> Comodo SafeSurf and (Comodo's own toolbar)
=> Backup
===> FAQ for Comodo Backup
===> Help
=> Verification Engine (allows you to verify what you see on the Internet)
=> Comodo Vulnerability Analyzer
=> AntiSpam
=> i-Vault
=> Launch Pad
=> Trusttoolbar
-----------------------------
Enterprise Security
-----------------------------
=> Comodo Endpoint Security Manager
-----------------------------
Compliance
-----------------------------
=> PCI DSS Compliance
-----------------------------
Learn about Computer Security and Interact with Security Experts
-----------------------------
=> Computer Firewalls
=> Anti Virus/Malware Products/Other Security products
=> Free Virus/Spyware/Trojan/Malware Removal by Comodo Experts
=> HIPS (Host Intrusion Prevention Systems)
=> Anti Phishing solutions
=> Digital Certificates, Encryption and Digital Signing
=> General Security Questions and Comments (not product related)
-----------------------------
Free Services for End Users
-----------------------------
=> UserTrust - First Independent Website Rating - Empowering our users!
=> User Anywhere (Remote Access product)
=> Comodo Meet (Web Conferencing Product)
=> Hacker Guardian
=> Trustfax (free Trial) (online faxing)
-----------------------------
Free Products
-----------------------------
=> Link to Free Comodo Products
-----------------------------
International Comodo Forums
-----------------------------
=> International Comodo Forums
===> 汉语语言, 漢語語言 / Chinese Simplified, Traditional
===> Nederlands / Dutch
===> Francais / French
===> Deutsch / German
===> ελληνικά / Greek
===> Magyar / Hungarian
===> Italiano / Italian
===> Nihongo / Japanese
===> Norsk / Norwegian
===> Polski / Polish
===> Português/Portuguese
===> По-русски / Russian
===> Espanol / Spanish
===> Svenska / Swedish
===> Turkce / Turkish
===> Українська / Ukrainian
===> tiếng Việt / Vietnamese
-----------------------------
Digital Certificates
-----------------------------
=> Code Signing Certificate
=> Content Verification Certificate
=> Email Certificate
=> SSL Certificate
-----------------------------
Web Server Products
-----------------------------
=> Two Factor Authentication for Web Applications
=> Trustlogo
-----------------------------
Infrastructure Products
-----------------------------
=> ZTL
=> Trustix Enterprise Firewall
-----------------------------
Other
-----------------------------
=> Forum Policy Violation Board
Page created in 0.137 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