Jump to content











Photo
* * * * * 1 votes

[tool] regCompact.


  • Please log in to reply
24 replies to this topic

#1 pscEx

pscEx

    Platinum Member

  • Team Reboot
  • 12702 posts
  • Location:Korschenbroich, Germany
  • Interests:What somebody else cannot do.
  •  
    European Union

Posted 16 February 2008 - 01:21 PM

An XP / W2003 registry 'empty' hive has a size of 8 kB.

The hive files grow in steps of 256 kB.
That means, if you insert only one key into an empty hive the file becomes 256 kB sized.

Inside the hive file there are 4KB steps.
That means, if you insert only one key into an empty hive, the used space inside the hive grows from 8 kB to 12 kB.

The remaining 244 kB are unused and filled by zeroes.

The regCompact program decreases the size of the hive to the remaining used 4 kB blocks.

Attached the program (syntax: 'regCompact <full path to hive>) and a script using the program.

Using this script I could decrease the size of the nativeEx_puzzleXP ISO by 600 kB.

BTW: I would like to know whether it also works for Vista hives.

Peter

Attached File  regCompact.zip   85.21KB   395 downloads

#2 d4vr0s

d4vr0s

    Member

  • Advanced user
  • 38 posts
  • Location:The greatest computer in the universe of time and space, designed by Deep Thought
  •  
    United States

Posted 16 February 2008 - 03:37 PM

First I must confess that I'm still not using Winbuilder (just haven't had time yet) :thumbsup:

I'm assuming this tool can be used stand alone.
I tried it on setupreg.hiv, default and software from pebuilder.
It appeared to do nothing with setupreg.hiv and default (no size change)
However, the software hive went from 3.44mb to 548kb.
Obviously this is a little too much compaction :D and the file is empty when opened with RegDatXP.
Is there any debugging that I can do to help with this or am I doing something wrong?

#3 pscEx

pscEx

    Platinum Member

  • Team Reboot
  • 12702 posts
  • Location:Korschenbroich, Germany
  • Interests:What somebody else cannot do.
  •  
    European Union

Posted 16 February 2008 - 04:10 PM

First I must confess that I'm still not using Winbuilder (just haven't had time yet) :thumbsup:

I'm assuming this tool can be used stand alone.
I tried it on setupreg.hiv, default and software from pebuilder.
It appeared to do nothing with setupreg.hiv and default (no size change)
However, the software hive went from 3.44mb to 548kb.
Obviously this is a little too much compaction :D and the file is empty when opened with RegDatXP.
Is there any debugging that I can do to help with this or am I doing something wrong?

I currently I have no idea what's happening with your pebuilder hives. Maybe (what I do not assume) that they are different from my WinBuilder hives. With those the tool works perfect.

Can you PM me your hives that I can check them?

Thanks

Peter

BTW: I'll also check RegDatXP. Maybe an info needed by RegDatXP is lost, inspite the hives work well in my final (WinBuilder) PE.

Peter

#4 d4vr0s

d4vr0s

    Member

  • Advanced user
  • 38 posts
  • Location:The greatest computer in the universe of time and space, designed by Deep Thought
  •  
    United States

Posted 16 February 2008 - 04:30 PM

As far as the hives go, I'm sure winbuilder and pebuilder create the same things.
I only mentioned it in case there was some dependency needed by your util.

There is a lot of personal software registration information in that hive so I'm a little hesitant to send it.

RegDatXP is simply a registry file viewer, nothing special.
I also tried loading the hive into regedit and windows got very unhappy with me.

If time permits I'll try building from a fresh/generic pebuilder and see what happens.

#5 pscEx

pscEx

    Platinum Member

  • Team Reboot
  • 12702 posts
  • Location:Korschenbroich, Germany
  • Interests:What somebody else cannot do.
  •  
    European Union

Posted 16 February 2008 - 04:46 PM

As far as the hives go, I'm sure winbuilder and pebuilder create the same things.
I only mentioned it in case there was some dependency needed by your util.

There is a lot of personal software registration information in that hive so I'm a little hesitant to send it.

RegDatXP is simply a registry file viewer, nothing special.
I also tried loading the hive into regedit and windows got very unhappy with me.

If time permits I'll try building from a fresh/generic pebuilder and see what happens.


I tried RegDatXP with 'my' hives: no problem.

attached the normal nativeEx_puzzleXP hives before regCompact.

Please try them.

You can check your hives, whether they follow 'my' rules:
With a hexeditor, check adresses 0x1000, 0x2000 ...

They all must have the 4 chars 'hbin'
When this sequence is ended there should be only zeroes upto the end of the file.

Peter

Attached File  pscHives.zip   37.21KB   290 downloads

#6 was_jaclaz

was_jaclaz

    Finder

  • Advanced user
  • 7100 posts
  • Location:Gone in the mist
  •  
    Italy

Posted 16 February 2008 - 05:45 PM

It seems like VERY nice. :thumbsup:

I will try it on the hives of the XPCLI project.

jaclaz

#7 d4vr0s

d4vr0s

    Member

  • Advanced user
  • 38 posts
  • Location:The greatest computer in the universe of time and space, designed by Deep Thought
  •  
    United States

Posted 16 February 2008 - 05:57 PM

Those files worked fine, and my software hive does appear to follow your requirements.
I have no problem believing it's still something in my file that's off :D

Edit:
Ok, I just had pebuilder (with no plugins as an experiment) build registry hives.
RegCompact did not break that software hive, but there was no size difference either.
It did change the timestamps so I have to think it did run on them.
The default hive was already 92kb as opposed to the one you posted that is 256.
I wonder if pebuilder already does this function. :thumbsup:

Anyway, the problem is with my file. :D :D

#8 pscEx

pscEx

    Platinum Member

  • Team Reboot
  • 12702 posts
  • Location:Korschenbroich, Germany
  • Interests:What somebody else cannot do.
  •  
    European Union

Posted 16 February 2008 - 06:38 PM

I wonder if pebuilder already does this function. :thumbsup:

Maybe I cloned an until now unknown function of pebuilder?

You can check it by hex editor, whether the last 4 kB are 'hbin'

Peter

#9 pscEx

pscEx

    Platinum Member

  • Team Reboot
  • 12702 posts
  • Location:Korschenbroich, Germany
  • Interests:What somebody else cannot do.
  •  
    European Union

Posted 16 February 2008 - 07:21 PM

Anyway, the problem is with my file. :thumbsup: :D

@d4vr0s (terrible to write your alias :D )
I got some worries:
I think that I'm a serious developer, and as serious developer I do not like that in something written by me there may be the possibility of 'crash'
This seems to be actual with the software hive you mentioned in your first post.

I understand your concerns that you do not have any reason to trust me (we both do not know each other).
But there is a way that I get the data I need for debug:

You can
  • xx all private data in your pebuilder project
    (really xx, the size of data must not change)
  • rebuild the project
  • send the resulting software hives
I think, in this way you will not publish any license key or private password.

Agreed?

Peter

#10 Nuno Brito

Nuno Brito

    Platinum Member

  • .script developer
  • 10544 posts
  • Location:boot.wim
  • Interests:I'm just a quiet simple person with a very quiet simple life living one day at a time..
  •  
    European Union

Posted 16 February 2008 - 07:27 PM

Interesting tool, congratulations! :thumbsup:


While raw editing the registry hives I did noticed a lot of redundant space between keys.


d4vr0s:

Look on the header of your registry hive - it contains the overall number of hbin's and might need manual correction.

There is also a checksum - I use RegEdit to read back the hives and ensure they are Win32 API compatible.

Also look here for raw edit:
http://www.boot-land...?showtopic=1839
http://www.beginning...7BDBDE30F2A569E

The first topic also contains a small tool for raw hive read.

:D

#11 d4vr0s

d4vr0s

    Member

  • Advanced user
  • 38 posts
  • Location:The greatest computer in the universe of time and space, designed by Deep Thought
  •  
    United States

Posted 16 February 2008 - 08:07 PM

@psc
I consider you a serious developer. :D
But, it is my responsibility to keep my information secure. :thumbsup:
I've forgotten most of the stuff that I've done (and why) in plugins and post process scripting.
Any one of those might be doing something that causing this issue.
Since no one else has posted about issues, I have to assume it's something I've done (or even some wrong in my OS).
So what I need to do is go over my setup, probably disable plugins and bypass the post processing to see if it works correctly.
I'm having a love/hate relationship with computers lately, getting a little burned out. :D

@Nuno
Thanks, I'll look over this material. :D

#12 pscEx

pscEx

    Platinum Member

  • Team Reboot
  • 12702 posts
  • Location:Korschenbroich, Germany
  • Interests:What somebody else cannot do.
  •  
    European Union

Posted 16 February 2008 - 08:13 PM

@psc
I consider you a serious developer. :thumbsup:
But, it is my responsibility to keep my information secure. :D
I've forgotten most of the stuff that I've done (and why) in plugins and post process scripting.
Any one of those might be doing something that causing this issue.
Since no one else has posted about issues, I have to assume it's something I've done (or even some wrong in my OS).
So what I need to do is go over my setup, probably disable plugins and bypass the post processing to see if it works correctly.
I'm having a love/hate relationship with computers lately, getting a little burned out. :D

@Nuno
Thanks, I'll look over this material. :D

;)
Peter

#13 pscEx

pscEx

    Platinum Member

  • Team Reboot
  • 12702 posts
  • Location:Korschenbroich, Germany
  • Interests:What somebody else cannot do.
  •  
    European Union

Posted 09 June 2008 - 05:27 PM

MedEvil found a bug:

In very rare cases it can happen that the compacted hive is corrupt.
(Statistically seen I estimate 1 of 10000 cases, in MedEvil's special constellation it has been 1 : 67500)

I fixed this in regCompact.Script version 3, stored on the nativeEx server.


@d4vr0s

Maybe this bug also caused the troubles you reported before.

You can download a new version of regCompact.exe here.

Peter

#14 d4vr0s

d4vr0s

    Member

  • Advanced user
  • 38 posts
  • Location:The greatest computer in the universe of time and space, designed by Deep Thought
  •  
    United States

Posted 10 June 2008 - 11:58 AM

Just did a quick test and it still corrupts the hive.
It has to be something I'm doing, I'm lacking motivation on finding out why right now. ;)

#15 niche99

niche99

    Frequent Member

  • Advanced user
  • 235 posts
  • Location:Aberdeen, Scotland
  •  
    Scotland

Posted 10 June 2008 - 04:14 PM

Just did a quick test and it still corrupts the hive.
It has to be something I'm doing, I'm lacking motivation on finding out why right now. ;)


I get Blue Screens when this script is activated. Using Winbuilder 075b2 and RegCompact v3.

niche99

#16 pscEx

pscEx

    Platinum Member

  • Team Reboot
  • 12702 posts
  • Location:Korschenbroich, Germany
  • Interests:What somebody else cannot do.
  •  
    European Union

Posted 10 June 2008 - 04:25 PM

I get Blue Screens when this script is activated. Using Winbuilder 075b2 and RegCompact v3.

niche99

Please post your hives BEFORE RegCompact. If there are some private data inside, PM them to me.
BTW: In my opinion, the issue is only depending on regCompact, and independent of WB version.

Peter

#17 niche99

niche99

    Frequent Member

  • Advanced user
  • 235 posts
  • Location:Aberdeen, Scotland
  •  
    Scotland

Posted 11 June 2008 - 04:18 PM

Please post your hives BEFORE RegCompact. If there are some private data inside, PM them to me.
BTW: In my opinion, the issue is only depending on regCompact, and independent of WB version.

Peter


How do I do this exactly. Are the hives in the Target\Project folder? Is this setupreg.hiv? <- only .hiv file in Target\%ProgectDir%\i386\System32 folder.

How do I attach a .zip to a PM message, I don't see how to do this when I PM you.

niche99

#18 pscEx

pscEx

    Platinum Member

  • Team Reboot
  • 12702 posts
  • Location:Korschenbroich, Germany
  • Interests:What somebody else cannot do.
  •  
    European Union

Posted 11 June 2008 - 05:04 PM

How do I do this exactly. Are the hives in the Target\Project folder? Is this setupreg.hiv? <- only .hiv file in Target\%ProgectDir%\i386\System32 folder.

How do I attach a .zip to a PM message, I don't see how to do this when I PM you.

niche99

Target\%ProgectDir%\i386\System32\setupreg.hiv
Target\%ProgectDir%\i386\System32\config\software
Target\%ProgectDir%\i386\System32\config\deafult

Peter

#19 niche99

niche99

    Frequent Member

  • Advanced user
  • 235 posts
  • Location:Aberdeen, Scotland
  •  
    Scotland

Posted 11 June 2008 - 05:35 PM

Target\%ProgectDir%\i386\System32\setupreg.hiv
Target\%ProgectDir%\i386\System32\config\software
Target\%ProgectDir%\i386\System32\config\deafult

Peter


Hi Peter,

Find attached a zip file 'No regCompact.zip'. This file contains the hives you requested plus log.html. These files are created with regCompact deactivated, if I rebuild with regCompact activated I get a Blue Screen. I am building a very minimal nativeEx using the available standard scripts. I add USB support and SATA support from the NativePE project <- reasonably sure these are not the problem as I can build without them and still get a Blue Screen.

niche99

#20 AeroXP

AeroXP

    Frequent Member

  • Advanced user
  • 177 posts
  • Location:0000:7c00
  • Interests:Motorola 68000 Assembler, PCs, Betas, Boot Disks, x86 Assembler
  •  
    United States

Posted 04 August 2008 - 02:34 PM

The application always crashes for me.

Exception EInOutError in module regCompact.exe at 00012F99.

File not found.


#21 pscEx

pscEx

    Platinum Member

  • Team Reboot
  • 12702 posts
  • Location:Korschenbroich, Germany
  • Interests:What somebody else cannot do.
  •  
    European Union

Posted 04 August 2008 - 02:43 PM

The application always crashes for me.

Exception EInOutError in module regCompact.exe at 00012F99.

 File not found.

Do you use regCompact.Script version 3?

If no, please update and try again.

If yes, can you PM me the crashing hive?

Peter

#22 AeroXP

AeroXP

    Frequent Member

  • Advanced user
  • 177 posts
  • Location:0000:7c00
  • Interests:Motorola 68000 Assembler, PCs, Betas, Boot Disks, x86 Assembler
  •  
    United States

Posted 04 August 2008 - 02:49 PM

Here's the hive:

(SetupREG from WinRoot)
Attached File  SETUPREG.zip   27.94KB   283 downloads

#23 pscEx

pscEx

    Platinum Member

  • Team Reboot
  • 12702 posts
  • Location:Korschenbroich, Germany
  • Interests:What somebody else cannot do.
  •  
    European Union

Posted 04 August 2008 - 03:10 PM

Here's the hive:

(SetupREG from WinRoot)
Attached File  SETUPREG.zip   27.94KB   283 downloads

Thanks, I got it.

If you think that thzere meay be some confidential or copyrighted stuff inside, you should edit your post now and remove the attachement.

Peter

#24 pscEx

pscEx

    Platinum Member

  • Team Reboot
  • 12702 posts
  • Location:Korschenbroich, Germany
  • Interests:What somebody else cannot do.
  •  
    European Union

Posted 04 August 2008 - 03:55 PM

Hi Peter,

Find attached a zip file 'No regCompact.zip'. This file contains the hives you requested plus log.html. These files are created with regCompact deactivated, if I rebuild with regCompact activated I get a Blue Screen. I am building a very minimal nativeEx using the available standard scripts. I add USB support and SATA support from the NativePE project <- reasonably sure these are not the problem as I can build without them and still get a Blue Screen.

niche99

Sorry, niche99! :cheers:

With the new post of AeroXP i saw your really forgotten post.

Your registries helped me at the time you posted, to fix a bug. >> regCompact.Script version 3
But I forgot to post success here :cheers:

I hope that you already are using version 3.

Peter

#25 pscEx

pscEx

    Platinum Member

  • Team Reboot
  • 12702 posts
  • Location:Korschenbroich, Germany
  • Interests:What somebody else cannot do.
  •  
    European Union

Posted 05 August 2008 - 01:07 PM

Here's the hive:

(SetupREG from WinRoot)
Attached File  SETUPREG.zip   27.94KB   283 downloads

With this hive I could not reprocuce your troubles.

The hive is compacted from 256 to 132 kb.

And it still can be mounted and looks nice in regedit.

If certain keys are lost or changed, please let me know.

Peter




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users