ReHIPS forum

English Subforum => Developers' Blog => Topic started by: fixer on December 01, 2017, 11:29:14 AM

Title: [FAQ] ReHIPS installer
Post by: fixer on December 01, 2017, 11:29:14 AM
You probably already wonder: installer is just a simple exe-file, just run it, click Next a couple of times, what interesting things could it probably hold? Wait a bit, we've got a couple of tricks up our sleeve.

Some of you already know RulesManager I posted earlier about https://forum.rehips.com/index.php?topic=9530.0 It allows to tweak default rules in any way to create your own and unique set of rules. But rules are installed when ReHIPS is installed, what if you want to install your own rules from the beginning? That's where installer trick comes into play. You can place your default.rdb next to the installer, and then it'll use your set of rules. You can also place settings.xml to install ReHIPS with your own set of settings. If it doesn't find these files, it'll use default ones.

And one more thing. I'm about to talk mostly about updating when newer ReHIPS version is installed.
If it finds these files next to the installer, it'll use them overwriting existing files.
But if it uses default files, it won't overwrite existing files. Before ReHIPS 2.4.0 existing files will be just left as they are. ReHIPS 2.4.0 and later will ask and update existing rules by merging them with new rules.
The files aren't distributed with the installer, so if they're found, they're put there on purpose, so overwriting is OK.
But if default files are used and destination files already exist, probably user created some custom rules, we don't want to overwrite them.
Title: Re: [FAQ] ReHIPS installer
Post by: Umbra on December 10, 2017, 07:45:07 PM
ok now i understand why i saw my own rules were automatically installed during installation :)
Title: Re: [FAQ] ReHIPS installer
Post by: Tarnak on December 28, 2017, 12:57:01 PM
I just updated to latest ReHIPS v2.3.0., and I got a popup during the install that said, "Install initial rules (recommended)?", to which I responded 'Yes' to.  Does that mean my previous rules are still kept from earlier ReHIPS installed version, and not deleted?
Title: Re: [FAQ] ReHIPS installer
Post by: fixer on December 28, 2017, 01:27:20 PM
There are 2 types of rules.

1. RulesManager rules. These are kept by default in default.rdb file. This blogpost is about default.rdb file, so it's about these rules only. ReHIPS 2.2.0 used RulesPack with embedded rules. RulesManager and default.rdb rules database were optional and are used by default from ReHIPS 2.3.0. If you haven't used optional RulesManager, you can skip it and proceed straight to paragraph 2. These rules are used by RulesManager when rules are installed. So you can customize them in any way, move to any other PC, etc. and these custom rules then can be installed.

2. Installed rules. These are already installed rules. They're kept in ReHIPS.xml file. These rules are valid for the PC they're installed to only and can't be moved to any other PC. When ReHIPS is updated, it asks should it install initial rules. Only new rules are installed, all already existing rules are kept and left as they are.
Title: Re: [FAQ] ReHIPS installer
Post by: Tarnak on December 28, 2017, 01:33:36 PM
I see...However, how do check to see what rules that I have created to date, and where are they accessible for view, i.e. path on C: drive?  Can I view both types of rules?  I am a little confused, as you can probably tell. ;)
Title: Re: [FAQ] ReHIPS installer
Post by: Tarnak on December 28, 2017, 01:55:01 PM
I am trying to open one of these rules 'locations' in Edge, but nothing is happening. The page stays blank, ...file:///C:/Program%20Files/ReCrypt/ReHIPS/ReHIPS.xml   I had to close the page, as nothing was happening.
Title: Re: [FAQ] ReHIPS installer
Post by: fixer on December 28, 2017, 02:55:38 PM
Rules of type 1 can be viewed in RulesManager. If you haven't used it, there will be only default rules bundled with ReHIPS. RulesManager is described here https://forum.rehips.com/index.php?topic=9530.0 You have to start it, open default.rdb file and you'll see all rules in a tree-like structure similar to Programs tree in main GUI.

Rules of type 2 can be viewed in standard ReHIPS Control Center (main and I'm sure familiar to you GUI), just open Settings on Programs tab. Yeah, they can be also viewed in xml file, but it's not that visual, and xml file is allowed to be opened to administrators for security reasons, that's why Edge wasn't able to open it and showed you an empty page.
Title: Re: [FAQ] ReHIPS installer
Post by: Tarnak on December 29, 2017, 01:42:07 AM
You mean like this?  Is this an example of Type 1 or Type 2, rules? Sorry, if this a dumb question.

Title: Re: [FAQ] ReHIPS installer
Post by: fixer on December 29, 2017, 12:14:42 PM
Yup, you're right. These are type 2 rules. These rules are already installed. And this is ReHIPS Control Center (a.k.a. main GUI) you have on the screenshot.
Title: Re: [FAQ] ReHIPS installer
Post by: Tarnak on December 30, 2017, 01:24:50 AM
Thanks....Hopefully, I will come to a full understanding of both types. ;)
Title: Re: [FAQ] ReHIPS installer
Post by: Ozone on December 31, 2017, 12:56:11 PM
After installing 2.3 over 2.2 I get popup "Install initial rules (recommended)?", I clicked yes and than I have to reboot.
Won't there be problem if user select "yes reboot now" immediately, which will cause that installer for initial rules won't have enough time to start/finish installing.
Just asking I didn't reboot immediately so I don't know.
Title: Re: [FAQ] ReHIPS installer
Post by: fixer on December 31, 2017, 01:54:57 PM
You're right, sometimes it takes some time to install all the rules.
But don't worry, even if installer is stopped at some point, later it'll detect that not all rules and installed and finish the installation.
Title: Re: [FAQ] ReHIPS installer
Post by: Tarnak on June 28, 2018, 04:10:32 AM
I have just installed the latest v2.4.0 over the top, and it was successful. However, before clicking on finish as per the attached screenshot, I then got a CMD window which opened at least a minute after I had captured that aforementioned screenshot, and the CMD window had a lot happening within. It then closed. It was to do with the install of ReHIPs.  I wish that I had taken a screenshot, but I missed my chance.  I decided to reboot, and my system started, normally.

Edit: Just tidying up my post.



Title: Re: [FAQ] ReHIPS installer
Post by: fixer on June 28, 2018, 10:40:44 AM
Installer indeed may spawn some console windows.
Currently it spawns 2 quickly closing windows when it prepares to install, these windows run shell commands to stop ReHIPS services in case they're running so the installer could update files.
And it spawns 1 more console window finishing the installation. This is RulesManager window, it installs (or updates) ReHIPS initial rules. And this window may take some time, depends on amount of rules it needs to install.
Title: Re: [FAQ] ReHIPS installer
Post by: Tarnak on June 28, 2018, 10:55:39 AM
Thanks.  ...It must have been the last option that I was seeing, because it went on for few seconds. Usually, when I see a console window it is for a very brief time. Almost, like just a flash, and it is gone!  ;)
Title: Re: [FAQ] ReHIPS installer
Post by: shmu26 on July 29, 2018, 05:25:15 PM
Quote from: fixer on December 28, 2017, 01:27:20 PM
2. Installed rules. These are already installed rules. They're kept in ReHIPS.xml file. These rules are valid for the PC they're installed to only and can't be moved to any other PC.
Just wondering is there a way to take my settings from the .xml file and put them in the default.rdb file?
Title: Re: [FAQ] ReHIPS installer
Post by: fixer on July 29, 2018, 09:07:01 PM
You mean for example your set of rules for programs? The short answer is no.

You see, .rdb file contains more information which isn't stored in ReHIPS.xml. For example in .rdb file you can indicate that this program should be looked for in installed programs, take path from there and append file name like photoshop.exe. In .xml file it's just plain C:\Program Files\Photoshop\photoshop.exe and you have no idea where it was taken from. Even if you take that path as is, it'll fail on another PC where it's installed for example in C:\Program Files\Photoshop 10.0\photoshop.exe. So it's a one-way process, you can get .xml from .rdb, but not the other way.