Welcome to the Comodo Forum
Welcome,
Guest
. Please
login
or
register
.
Did you miss your
activation email?
June 19, 2013, 12:24:14 PM
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
668924
Posts
71133
Topics
145742
Members
Latest Member:
Bukovskiy_Konstantin
more news...
Search:
Advanced search
|
Tag Cloud
Welcome to the Comodo Forum
Archived Boards
Discontinued Products
Comodo Firewall
Help for v2
Script to Backup CPF v2.4 firewall settings
« previous
next »
Pages:
1
2
[
3
]
4
5
...
11
Author
Topic: Script to Backup CPF v2.4 firewall settings (Read 150039 times)
Rotty
Comodo's Hero
Offline
Posts: 903
http://www.venganza.org/ - Noodly Appendage
Re: Script to Backup CPF firewall settings
«
Reply #30 on:
November 04, 2006, 11:05:22 PM »
I'm glad you have found it of use. If any more programming projects i can see that may come up with COMODO products i will have to make a thread advertising the idea and try to attract any hobiest or professional programmers into it (Depending on size, whether it is outside the spare time panic and I have.)
cheers, rotty
Logged
The opinions expressed in my posts are my own.
They do NOT necessarily represent or reflect the views of my employer.
apache255
Guest
Re: Script to Backup CPF firewall settings
«
Reply #31 on:
November 21, 2006, 04:27:08 PM »
just tried version 1.2 and ended up wth error messages in the console, and empty folders created everywhere...well not everywhere but one called document on C, and a few others around the zip file. Are you supposed to run this file from a special folder? Anyway could anybody tell me where the cpf rules are stored in the registry. Even if the script can work, I'd like to know where cpf locates Network Rules in the registry.Thanks for your help.
Logged
Little Mac
Forum Volunteer
Global Moderator
Comodo's Hero
Offline
Posts: 6303
The Colonel told me to.
Re: Script to Backup CPF firewall settings
«
Reply #32 on:
November 21, 2006, 05:50:33 PM »
I also just ran v1.2. It created the following chain of folders (within the folder I ran it from):
Users.WINDOWS/CPFBackup/Prior (Capitalizations, etc are exact to what was created).
Folder "Prior" is apparently empty.
The zipped file was unpacked, and I ran the batch file. The DOS window showed what would seem to be the proper sequence, and said it was done.
I have not installed the Beta; I have CPF v.2.3.6.81
LM
Logged
These forums are focused on providing help and improvement for Comodo products. Please treat other users with respect and make a positive contribution. Thanks.
Forum Policy
apache255
Guest
Re: Script to Backup CPF firewall settings
«
Reply #33 on:
November 21, 2006, 06:05:21 PM »
anybody knows if the backup script 1.2 works at all with cpf beta 2.4?
Logged
panic
Global Moderator
Comodo's Hero
Offline
Posts: 11205
Linux is free only if your time is worthless.;-)
Re: Script to Backup CPF firewall settings
«
Reply #34 on:
November 21, 2006, 08:01:02 PM »
Quote from: apache255 on November 21, 2006, 04:27:08 PM
just tried version 1.2 and ended up wth error messages in the console, and empty folders created everywhere...well not everywhere but one called document on C, and a few others around the zip file. Are you supposed to run this file from a special folder? Anyway could anybody tell me where the cpf rules are stored in the registry. Even if the script can work, I'd like to know where cpf locates Network Rules in the registry.Thanks for your help.
I'm looking into it now. Will post back shortly.
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 can't conform, don't use the forum.
panic
Global Moderator
Comodo's Hero
Offline
Posts: 11205
Linux is free only if your time is worthless.;-)
Re: Script to Backup CPF firewall settings
«
Reply #35 on:
November 21, 2006, 11:00:23 PM »
G'day,
There is a problem with the 1.2 script.
It uses the %allusersprofile% system variable, and by default, this variable is set to "C:\Documents and Settings\All Users". Note the SPACE between the word "Documents" and the word "and".
Due to the way CMD.EXE parses script commands, if a sequence of characters that contains one or more SPACE characters isn't enclosed within quotation marks, CMD.EXE interprets the string UP TO THE FIRST SPACE only as a command. As the script is fed a variable which has to be substituted with the current value of the variable (C:\Documents and Settings\All Users), CMD.EXE only interprets up to the first space character.
This is why we end up with a folder in the root of dirve C: called "C:\DOCUMENTS".
How to get around this?
The easiest way is to edit the script and replace all instances of "%ALLUSERSPROFILE%" with a location of your choice, preferably a second hard drive or a removable storage device (There's little sense storing a backup of your firewall rules on the same hard drive).
IMHO, I would stick to V1.1 of the script. The BEST alternative is to modify V1.1 to suit your particular requirements. The scripts were developed by Rotty as a simple means of capturing and restoring the current config in the event of a reinstall wiping out the current rule/app set (as happens between major revisions).
An example of an edited V1.1 script is below. This example creates a folder in the root of drive D: called "CPFBackup" with a sub-folder called "Prior". It has also added some text to remind users to turn off the registry protection in CPF before running the backup.
Cut and paste the code that is shown in RED into notepad (or any other text editor) and save it as a .BAT file. If using notepad, remember to change the file type from TEXT to ALL FILES. Also, remember to change the "[at] " sequence in the top line of the code to the real "at" symbol before saving.
SAMPLE CODE
********************************************
[at]echo off
cls
echo *****************************
echo The settings are backed up to d:\CPFBackup\CPFRUles.REG
echo Merge the "CPFrules.reg" file back, to restore settings
echo *****************************
echo.
echo.
echo Before continuing, turn off registry protection in CPF.
echo.
echo This is found in SECURITY - ADVANCED - MISCELLANEOUS
echo.
echo.
echo To start press enter. To quit press the "x" button on this window
pause >nul:
cls
if not exist d:\CPFBackup goto :new
goto :archive
:archive
echo Clearing oldest backup - please wait
del d:\CPFBackup\Prior\CPFRUles.REG >nul:
echo Storing previous backup - please wait ...
copy d:\CPFBackup\CPFRUles.REG d:\CPFBackup\Prior\CPFRUles.REG
echo Archiving current rule set - please wait ...
REGEDIT /E d:\CPFBackup\CPFRUles.REG "HKEY_LOCAL_MACHINE\SYSTEM\Software\Comodo\Personal Firewall"
goto :end
:new
cls
echo.
echo Creating folders - please wait ...
echo.
md d:\CPFBackup
md d:\CPFBackup\Prior
echo Archiving registry keys - please wait ...
REGEDIT /E d:\CPFBackup\CPFRUles.REG "HKEY_LOCAL_MACHINE\SYSTEM\Software\Comodo\Personal Firewall"
copy d:\CPFBackup\CPFRUles.REG d:\CPFBackup\Prior\CPFRUles.REG >nul:
goto :end
:end
echo DONE!!!
echo Press any key to end
pause >nul:
***************************************************
Hope this helps, and sorry for the screw up.
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 can't conform, don't use the forum.
apache255
Guest
Re: Script to Backup CPF firewall settings
«
Reply #36 on:
November 22, 2006, 03:28:18 AM »
hi Ewen!
well thanks very much for your detailed answer concerning the script. I'm gonna try this today
cheers
Apache
Logged
Rotty
Comodo's Hero
Offline
Posts: 903
http://www.venganza.org/ - Noodly Appendage
Re: Script to Backup CPF firewall settings
«
Reply #37 on:
November 22, 2006, 04:55:50 AM »
I don't know if it will work with 2.4 beta, maybe panic can test that some time.
I don't have a test environment, sniff.
if the registry entries are in the same place as they were with 2.3, then their SHOULD not be a problem. Since you are using the beta which usually signifies that you have a test environment, then you could test it for us if you want (-:
cheers, rotty
Logged
The opinions expressed in my posts are my own.
They do NOT necessarily represent or reflect the views of my employer.
Little Mac
Forum Volunteer
Global Moderator
Comodo's Hero
Offline
Posts: 6303
The Colonel told me to.
Re: Script to Backup CPF firewall settings
«
Reply #38 on:
November 22, 2006, 11:15:51 AM »
TNX for your time and effort, guys, to investigate and edit the script.
I changed it to send to my flash drive; it appears to have worked fine, as I now have a registry backup file on there.
Ultimately, does the destination truly matter? I mean, even if it were set to save it on the C:\ drive (assuming that to be the system drive), as long as the user knows the location, they can move the entire file off-system to another drive, CD, etc. Is that correct, or does something else factor in that would make that impossible?
Thanks again,
LM
Logged
These forums are focused on providing help and improvement for Comodo products. Please treat other users with respect and make a positive contribution. Thanks.
Forum Policy
apache255
Guest
Re: Script to Backup CPF firewall settings
«
Reply #39 on:
November 22, 2006, 11:40:01 AM »
thanks panic, I've jsut tried your script on the beta and it worked just fine. I got 2 identical backups, one directly under cpfbackup and a second one under a subfolder called prior...strange but it does not matter.Once again good job.
cheers
Logged
panic
Global Moderator
Comodo's Hero
Offline
Posts: 11205
Linux is free only if your time is worthless.;-)
Re: Script to Backup CPF firewall settings
«
Reply #40 on:
November 22, 2006, 03:17:21 PM »
Quote from: apache255 on November 22, 2006, 11:40:01 AM
thanks panic, I've jsut tried your script on the beta and it worked just fine. I got 2 identical backups, one directly under cpfbackup and a second one under a subfolder called prior...strange but it does not matter.Once again good job.
cheers
The folder and the subfolder hold the current ruleset and the previous set, respectively, just to give us a better fallback postition.
cheers, and glad to hear it worked!
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 can't conform, don't use the forum.
panic
Global Moderator
Comodo's Hero
Offline
Posts: 11205
Linux is free only if your time is worthless.;-)
Re: Script to Backup CPF firewall settings
«
Reply #41 on:
November 22, 2006, 03:20:29 PM »
Quote from: Little Mac on November 22, 2006, 11:15:51 AM
TNX for your time and effort, guys, to investigate and edit the script.
I changed it to send to my flash drive; it appears to have worked fine, as I now have a registry backup file on there.
Ultimately, does the destination truly matter? I mean, even if it were set to save it on the C:\ drive (assuming that to be the system drive), as long as the user knows the location, they can move the entire file off-system to another drive, CD, etc. Is that correct, or does something else factor in that would make that impossible?
Thanks again,
LM
Does the destination matter? Yes, - the sense is storing your backups on the drive that are backing up is what??? LOL
The REG file can be transpported anywhere!
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 can't conform, don't use the forum.
Little Mac
Forum Volunteer
Global Moderator
Comodo's Hero
Offline
Posts: 6303
The Colonel told me to.
Re: Script to Backup CPF firewall settings
«
Reply #42 on:
November 22, 2006, 05:36:09 PM »
Quote from: panic on November 22, 2006, 03:20:29 PM
Does the destination matter? Yes, - the sense is storing your backups on the drive that are backing up is what??? LOL
The REG file can be transpported anywhere!
ewen :-)
I guess my question was, are three different scripts for different file destinations really needed? Why not just one script with a known save location (whatever that might be) with the statement that the user needs to move the file off-system to another drive.
I totally get the point of not having it on the drive that's gonna crash. I may not know much (and I am from Texas...), but I know THAT much. Wasn't born yesterday.
LOL
LM
Logged
These forums are focused on providing help and improvement for Comodo products. Please treat other users with respect and make a positive contribution. Thanks.
Forum Policy
panic
Global Moderator
Comodo's Hero
Offline
Posts: 11205
Linux is free only if your time is worthless.;-)
Re: Script to Backup CPF firewall settings
«
Reply #43 on:
November 23, 2006, 12:30:55 AM »
Quote from: Little Mac on November 22, 2006, 05:36:09 PM
I guess my question was, are three different scripts for different file destinations really needed? Why not just one script with a known save location (whatever that might be) with the statement that the user needs to move the file off-system to another drive.
I totally get the point of not having it on the drive that's gonna crash. I may not know much (and I am from Texas...), but I know THAT much. Wasn't born yesterday.
LOL
LM
Rotty wrote the three versions to try and satify the differing requests he received after the wrote the first, palin vanilla one. We have added some hints on how to modify (e.g by using %1 to represent a pramater passed at the command line, etc.) but a lot of people's collective eyes glazed over when we started talking DOS. LOL
I agree, one straight forward version would be best, but its only best for those who can modify to suit their explicit needs.
Cheers LM,
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 can't conform, don't use the forum.
panic
Global Moderator
Comodo's Hero
Offline
Posts: 11205
Linux is free only if your time is worthless.;-)
Re: Script to Backup CPF firewall settings
«
Reply #44 on:
November 27, 2006, 08:21:02 AM »
Hey Rotty,
Have a look at
http://forums.comodo.com/index.php/topic,4128.msg31222.html#msg31222
Your scripts been adapted to backup the Comodo Backup jobs and settings.
Thanks again,
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 can't conform, don't use the forum.
Tags:
Pages:
1
2
[
3
]
4
5
...
11
« previous
next »
Jump to:
Please select a destination:
-----------------------------
General Category
-----------------------------
=> Melih's Corner - CEO Talk/Discussions/Blog
=> Comodo.TV - Our Internet Video Channel
===> Comodo.TV - News and Announcements
===> Comodo.TV - Program Lineup
===> Audience Feedback and Suggestions
=> Which Product do you want Comodo to develop next?
=> How Can I Help Comodo? (Please We Need You!)
===> Report Comodo Forum / Web Site Issues
===> Please Tell Us Your Views and Vote Here!
===> Help Spread the Word - Banners and Logos
=> General Discussion (off topic) Anything and everything...
===> Member Confessions :-)
===> Funny Photos :-)
===> Cool Stuff
-----------------------------
Security Products & Services
-----------------------------
=> Comodo Internet Security - CIS
===> News / Announcements / Feedback - CIS
=====> Wishlist - CIS
===> Help - CIS
=====> Guides - CIS
=====> AntiVirus Help - CIS
=======> AntiVirus FAQ - CIS
=====> Firewall Help - CIS
=======> Firewall FAQ - CIS
=====> Defense+ / Sandbox Help - CIS
=======> Defense+ / Sandbox FAQ - CIS
=====> Install / Setup / Configuration Help - CIS
=======> Install / Setup / Configuration FAQ - CIS
===> Bug Reports - CIS
===> AV False Positive/Negative Detection Reporting
=> Comodo Cleaning Essentials + KillSwitch & Autoruns - CCE
===> News / Announcements / Feedback - CCE
=====> Wishlist - CCE
===> Help - CCE
===> Bug Reports - CCE
=> Comodo Antivirus for Mac OS X - CAVM
=> Comodo Antivirus for Linux - CAVL
=> Comodo Mobile Security - CMS
=> Comodo Time Machine - CTM
===> News / Announcements / Feedback - CTM
===> Help - CTM
=====> FAQ - CTM
===> Bug Reports - CTM
=> Comodo Dragon - CD
===> News / Announcements / Feedback - CD
=====> Wishlist - CD
===> Help - CD
=====> FAQ - CD
===> Bug Reports - CD
=> COMODO IceDragon - CID
===> News / Announcements / Feedback – CID
=====> Wishlist - CID
===> Help – CID
===> Bug Reports - CID
===> Beta Corner – CID
=> Comodo LoginPRO
=> Comodo Disk Encryption - CDE
===> News / Announcements / Feedback - CDE
=====> Wishlist - CDE
===> Help - CDE
=====> FAQ - CDE
===> Bug Reports - CDE
=> Comodo Secure DNS - DNS
===> News / Announcements / Feedback - DNS
===> Help - DNS
=> Comodo Unite (EasyVPN) - CUnite
===> News / Announcements / Feedback - CUnite
===> Help - CUnite
=====> FAQ - CUnite
===> Bug reports - CUnite
=> Comodo TrustConnect - CTC
=> Comodo SiteInspector - CSI
=> Comodo Valkyrie - FLS
=> Comodo Instant Malware Analysis Online - CIMA
=> Comodo Rescue Disk - CRD
-----------------------------
Desktop Utilities & Services
-----------------------------
=> Comodo System Utilities - CSU
===> News / Announcements / Feedback - CSU
===> Help - CSU
=====> FAQ - CSU
===> Wishlist - CSU
=> Comodo Backup - CB
===> News / Announcements / Feedback - CB
===> Comodo Cloud
===> Help - CB
=====> FAQ - CB
===> Wishlist - CB
=> Comodo Programs Manager - CPM
===> News / Announcements / Feedback – CPM
===> Help - CPM
===> Wishlist - CPM
=> GeekBuddy & Live PC Support
=> GeekBuddy PC Health Check - PCHC
===> News/ Announcements / Feedback – PCHC
===> Help - PCHC
-----------------------------
Business / Enterprise Security Products & Services
-----------------------------
=> Digital Certificates
===> Code Signing Certificate
===> Content Verification Certificate
===> Email Certificate
===> SSL Certificate
=> PCI DSS Compliance
=> Comodo Endpoint Security Manager
===> Endpoint Security Manager 1.6
===> Endpoint Security Manager 2.0 Business Edition
===> Endpoint Security Manager 2.1
===> Endpoint Security Manager 3.0
=====> CESM 3.0 Beta
===> ESM Console for Windows Phone
===> Earlier versions of CESM
=> Two Factor Authentication for Web Applications
=> Trustlogo
=> Hacker Guardian
=> Comodo Network Center - CNC
=> Comodo AntiSpam Gateway - Hosted Anti Spam Service
-----------------------------
Learn about Computer Security and Interact with Security Experts
-----------------------------
=> General Security Questions and Comments
=> Virus/Malware Removal Assistance
=> Leak Testing/Attacks/Vulnerability Research
=> Digital Certificates, Encryption and Digital Signing
=> Other Security Products
-----------------------------
International Comodo Forums
-----------------------------
=> International Comodo Forums
===> 汉语语言, 漢語語言 / Chinese Simplified, Traditional
===> Česky / Czech
===> Dansk / Danish
===> Nederlands / Dutch
===> Suomi / Finnish
===> Francais / French
===> Deutsch / German
===> ελληνικά / Greek
===> Magyar / Hungarian
===> Italiano / Italian
===> Nihongo / Japanese
===> Norsk / Norwegian
===> Polski / Polish
===> Português/Portuguese
===> Română / Romanian
===> По-русски / Russian
=====> News & FAQ
=====> Оффтоп (OFFTOP)
=====> Архив / Archive
===> Slovenský / Slovak
===> Slovenščina / Slovenian
===> Espanol / Spanish
===> Svenska / Swedish
===> Turkce / Turkish
===> Українська / Ukrainian
===> Việt / Vietnamese
===> Estonian
===> Arabic
-----------------------------
Archived Boards
-----------------------------
=> Discontinued Products
===> Comodo Web Application Firewall - CWAF
===> Comodo HopSurf - CHS
===> Comodo AntiSpam - CAS
=====> Help - CAS
=======> FAQ - CAS
=====> News / Announcements / Feedback - CAS
=======> Wishlist - CAS
=====> Bug Reports - CAS
===> Verification Engine - CVE
===> Comodo Secure Email - CSE
=====> News / Announcements / Feedback - CSE
=====> Help - CSE
=======> FAQ - CSE
=====> Bug Reports - CSE
===> Comodo Cloud Scanner - CCS
=====> News / Announcements / Feedback - CCS
=====> FAQ - CCS
=====> Beta Corner - CCS
=====> Wishlist - CCS
===> Comodo Anti-Viruspyware (CAVS)
=====> Help for Comodo AntiVirus
=====> FAQ for Comodo Anti-ViruSpyware
=====> Feedback/Comments/Announcements/News about CAVS
=====> CAVS BETA Corner
=====> Announcements
=====> Comodo BOClean Anti-Malware FAQ
===> Comodo Diskshield
===> Comodo Firewall
=====> Feedback/Comments/Announcements/News
=====> Help for v3
=====> Help for v2
=====> Frequently Asked Questions (FAQ) for Comodo firewall
=====> CFP BETA Corner
=======> 32 bit bug reports
=======> 64 bit bug reports
=====> Comodo Firewall Translations
=====> Bug Reports
===> i-Vault
===> Launch Pad (Discontinued)
===> Comodo Meet (Web Conferencing Product) (Discontinued)
===> Comodo Memory Firewall(Buffer Overflow Protection)
=====> Comodo Memory Firewall Beta Corner
=====> Help
=====> Frequently Asked Questions (Comodo Memory Firewall)
=====> Feedback/Comments/Announcements/News
===> Safesurf
===> Trusttoolbar (Discontinued)
===> Trustfax (online faxing)
===> Trustix Enterprise Firewall
===> User Anywhere (Remote Access product) (Discontinued)
===> UserTrust - First Independent Website Rating - Empowering our users!
===> Comodo Vulnerability Analyzer - CVA
===> ZTL
=> Comodo Wiki Project
Page created in 0.543 seconds with 22 queries.
Powered by SMF 1.1.18
|
SMF © 2006, Simple Machines
Design by
7dana.com