[UTIL] REG/RGU Cleaner

Search This thread

OndraSter

Retired Recognized Developer
Mar 27, 2009
2,083
272
31
Prague
Hi,
I've been looking for some app, that will take my .reg or .rgu file (dump of WM registry), specially for OEMDrivers rgu, which is over 300kB large, delete duplicated stuff, sort it etc.

That's why I created this app.

What can it do:
- Grabs your input file, goes through it, takes together all registry nodes, when you have some key twice or more times, it gets overwritten so you're sure it isn't anywhere else after that
- Put it back to new output file :D
- Can remove "padding" zeroes at dwords, like you have "something"=dword:0000001 -- it removes the first zeros. They are not needed there and it is way readable IMHO (maybe not for everybody, so I made it as checkbox)

rguclean3435.png


It made from OEMDrivers RGU of size 313kB new one with only 270kB! With human readable lines

With version 1.7 I fixed bug, that it got saved as ANSI rather UNICODE (thanks for others noticing that), thus having 50% of file size compared to supposed size. But Unicode is the right way to save that, sorry guys! (Platformrebuilder can use both, but OSBuilder maybe not? Well this is the better way).

Also, with 1.7, there's added option to run it from command line like rgucleaner.exe <sourcefile> <targetfile> and it _should_ close itself, but I'm not sure, I can't test it now. It was done as request :)

Version 1.8 update -- fixed "="="something" line in Mango beta for HD2. (thanks tslany for reporting). Plus now any problem with parsing line when it fails parsing even before checking if it is correct is now catched too rather crashing and reports the problematic line.
 

Attachments

  • RegCleanup_1.1.zip
    6.2 KB · Views: 107
  • RegCleanup_1.2.zip
    6.2 KB · Views: 134
  • RegCleanup_1.3.zip
    6.2 KB · Views: 53
  • RegCleanup_1.4.zip
    6.4 KB · Views: 437
  • RegCleanup_1.7.zip
    6.7 KB · Views: 780
  • RegCleanup_1.8.zip
    6.8 KB · Views: 489
Last edited:

OndraSter

Retired Recognized Developer
Mar 27, 2009
2,083
272
31
Prague
OK, version 1.2 UP on first post!

Fixed registry, where was - on beginning (delete)
Added support for mui_sz string values
 
  • Like
Reactions: ceesheim

OndraSter

Retired Recognized Developer
Mar 27, 2009
2,083
272
31
Prague
It doesn't delete anything, but:

1. loads into "virtual registry" as if it was in real registry
2. overwrites stuff that are twice etc (same name in each subkey) -- here gets lost most of the stuff, since many lines are in it sometimes more than one time*
3. and dumps from the "virtual registry"

And yes, for some unknown reason, whole system feels faster. But that's just some kind of psychics LOL.

*EXAMPLE:

[HKLM\something]
"foo"=dword:0000001
"bar"="hujah"
"woohoo"=mui_sz:"phcanoverbmp.dll,#32"
[HKLM\something]
"bar"="newone"

will merge into

[HKLM\something]
"foo"=dword:1
"bar"="newone"
"woohoo"=mui_sz:"phcanoverbmp.dll,#32"

just as in real registry or when going in prb would happen.
 
  • Like
Reactions: ceesheim

kokotas

Senior Member
Oct 23, 2007
714
1,570
Athens
Hi OndraSter!

This is a great tool! And too d@#n fast!!! Nice Work again;)
I was trying to make something like this for cli usage, but failed miserably! lol:D
So here I am, suggesting you to add a cmd line usage.
Something like :
Code:
RegCleanup.exe -IMGFS -XIP
that could be used while dumping a rom so all the registry files from imgfs and xip would get cleaned up!
Just a suggestion...
Anyway, thanks for all your work!

Regards!
 

OndraSter

Retired Recognized Developer
Mar 27, 2009
2,083
272
31
Prague
Hi kokotas,
You mean like go through all packages and clean their registry files?

I think it is possible, Ill look on it when I get some time :)
 
  • Like
Reactions: ceesheim

rickou26

Senior Member
Dec 26, 2007
752
55
Hello,

OndraSter thank you for this handy utility. I'm having a problem with the RGU attached. We hope you find its origin. ;)

By.
 

Attachments

  • rgu.zip
    19 KB · Views: 24

OndraSter

Retired Recognized Developer
Mar 27, 2009
2,083
272
31
Prague
Fixed, nasty bug

It was reading line 844
"DialSuffix"=";"

and everything after ; was marked as comment and didnt check if it isnt in " actually.

Should be working now, it parsed it fine :) (Version 1.3)
 
  • Like
Reactions: ceesheim

Xkan

Senior Member
Jan 6, 2009
299
0
Tested it with the driver's .rgu and it is a very nice tool - cleaner and better readable registry files - nice :)
 

OndraSter

Retired Recognized Developer
Mar 27, 2009
2,083
272
31
Prague
Yay your RGU was devil's made :D

Never seen (not sure if they are actually supported!) comments in rgu like
/* something */
or lines with just ========================


So I added checkbox "inform on incompatible lines" which, when checked, will popup lines it failed to load

Also I fixed the
"something"=-
lines, which were supposed to get deleted (but they didnt in previous versions)

1.4 up!
 
  • Like
Reactions: ceesheim

OndraSter

Retired Recognized Developer
Mar 27, 2009
2,083
272
31
Prague
The :D smile means that you are just joking? :D

Just click on Input and select input file (the one that will be parsed)
Then click on Output and select output file (there it will be saved)
and click on GO
 
  • Like
Reactions: ceesheim

Top Liked Posts

  • There are no posts matching your filters.
  • 2
    Hi,
    I've been looking for some app, that will take my .reg or .rgu file (dump of WM registry), specially for OEMDrivers rgu, which is over 300kB large, delete duplicated stuff, sort it etc.

    That's why I created this app.

    What can it do:
    - Grabs your input file, goes through it, takes together all registry nodes, when you have some key twice or more times, it gets overwritten so you're sure it isn't anywhere else after that
    - Put it back to new output file :D
    - Can remove "padding" zeroes at dwords, like you have "something"=dword:0000001 -- it removes the first zeros. They are not needed there and it is way readable IMHO (maybe not for everybody, so I made it as checkbox)

    rguclean3435.png


    It made from OEMDrivers RGU of size 313kB new one with only 270kB! With human readable lines

    With version 1.7 I fixed bug, that it got saved as ANSI rather UNICODE (thanks for others noticing that), thus having 50% of file size compared to supposed size. But Unicode is the right way to save that, sorry guys! (Platformrebuilder can use both, but OSBuilder maybe not? Well this is the better way).

    Also, with 1.7, there's added option to run it from command line like rgucleaner.exe <sourcefile> <targetfile> and it _should_ close itself, but I'm not sure, I can't test it now. It was done as request :)

    Version 1.8 update -- fixed "="="something" line in Mango beta for HD2. (thanks tslany for reporting). Plus now any problem with parsing line when it fails parsing even before checking if it is correct is now catched too rather crashing and reports the problematic line.
    1
    :)

    Wait till I get back, I got updated version, I forgot to include mui_sz registry value kind:confused:.
    1
    OK, version 1.2 UP on first post!

    Fixed registry, where was - on beginning (delete)
    Added support for mui_sz string values
    1
    It doesn't delete anything, but:

    1. loads into "virtual registry" as if it was in real registry
    2. overwrites stuff that are twice etc (same name in each subkey) -- here gets lost most of the stuff, since many lines are in it sometimes more than one time*
    3. and dumps from the "virtual registry"

    And yes, for some unknown reason, whole system feels faster. But that's just some kind of psychics LOL.

    *EXAMPLE:

    [HKLM\something]
    "foo"=dword:0000001
    "bar"="hujah"
    "woohoo"=mui_sz:"phcanoverbmp.dll,#32"
    [HKLM\something]
    "bar"="newone"

    will merge into

    [HKLM\something]
    "foo"=dword:1
    "bar"="newone"
    "woohoo"=mui_sz:"phcanoverbmp.dll,#32"

    just as in real registry or when going in prb would happen.
    1
    Hi kokotas,
    You mean like go through all packages and clean their registry files?

    I think it is possible, Ill look on it when I get some time :)