2 Registry Command Line API Tool
3 ------------------------------
5 This progam is intended to fill a particular need. I needed to make the
6 wine registry look like it would have been if my application would have
7 been installed by its installation program. Since this was not possible I
8 took the following approach.
10 1 - Use regedit to export my full Windows registry before I install my
13 2 - Use regedit to export my full Windows registry after I had install my
16 3 - Generate the differences between the two image. What I obtain from the
17 diff is what I need to apply to the wine registry.
19 Obvisouly the process is not that straight forward to solve, first,
20 you don't get the diff between two Windows regedit exported .reg file by
21 doing a simple diff. What I had to do is a little more complex, but not
24 (Assuming that the registry picture files are
25 named ./before.reg and ./after.reg)
27 1 - Parse the before.reg and after.reg file into regFixer.pl, in order to
28 obtain lines in the form [HKEY\Sub1\Sub2\...\Subn]"Value"="Data"
29 (where "Data" can be prefixed by the type identifier : hex:, hex(0000000?)
32 2 - Generate the diff between the before.reg.fix and after.reg.fix
35 Now we have a app.reg file that contain what has been done by installing the
36 application. To this we extract the parts that we are interested in using
37 grep (and fix it with sed) and put that into app.added by example
38 ( let's say we keep the added values only ).
40 At this point we know which registry entry to add to the wine registry. It
41 only remains to take the format we have and reset it into a format we get from
44 So, once you parsed app.added into regRestorer.pl you get an app.reg ready to
47 So, this package comes with a few pieces:
49 regFixer.pl - Will convert the export of regedit
50 into something "diff-able"
52 regRestorer.pl - Will convert "cleaned" diff file into
53 something "regapi-able"
55 regSet.sh - Will do the procedure explained herein
56 for the added key only.
64 1 - Get a snapshot of your windows registry in before.reg, (regedit/export)
65 2 - Install your application,
66 3 - Get a snapshot of your windows registry in after.reg.
67 4 - Invoke ./regSet.sh before.reg after.reg
70 Adding key I have in a regedit export file (nothing to diff with...)
71 ------------------------------------------
72 1 - Invoke ./regSet.sh /dev/null myRegistry.reg
76 1 - regapi has some sort of "man page like" help in it, simply invoke it
77 without any arguments.
79 Hope this is of any use to you.