Any Software that can condense .reg files?

  • Thread starter Thread starter RandomUser
  • Start date Start date
  • Views Views 1,225
  • Replies Replies 4

RandomUser

Rosalina in Plush Form
Member
Joined
May 9, 2010
Messages
1,004
Solutions
1
Reaction score
630
Trophies
1
XP
1,111
Country
United States
I do not know if such software exist where it can automatically prune entries in the .reg file created by regedit. So for example after exporting an Office 2019 registry entries into a reg file:
Code:
Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office]

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\15.0]

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\15.0\ClickToRun]

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\15.0\ClickToRun\propertyBag]
"Version"="15.0.9999.9999"
Keep in mind the above entry shown is a fraction of the entries in the reg file.
So I would like to prune some of those entries and I could do that by manually deleting them, but that will take forever. Anyway I would like the resulting to be this:
Code:
Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\15.0\ClickToRun\propertyBag]
"Version"="15.0.9999.9999"
This is more condense and is equivalent to the first entry.
 
I don't know if such program exists but based on you requirement it seems a pretty easy and interesting challenge that can easily be done with moderate coding skills.
 
  • Like
Reactions: cearp
If it is just text files you should be able to do something with the regex (short for regular expressions) features of any vaguely programming oriented text editor (notepad++ if you need an example https://notepad-plus-plus.org/downloads/ and also available on https://ninite.com/ , its regex stuff is covered nicely in https://markantoniou.blogspot.com/2008/06/notepad-how-to-use-regular-expressions.html and http://blog.hakzone.info/posts-and-articles/editors/understanding-regex-with-notepad/comment-page-1/ and https://gerardnico.com/ide/notepad/replace )

If you want to get a bit more advanced then grep, awk and sed are probably what you will be looking at before you do start making your own program (see most uses of python and perl). Most would associate them with linux and such like but Windows ports are available
http://matt.might.net/articles/sculpting-text/

That said are you really doing this enough that you have to have such a thing?
 
  • Like
Reactions: RandomUser
If it is just text files you should be able to do something with the regex (short for regular expressions) features of any vaguely programming oriented text editor (notepad++ if you need an example https://notepad-plus-plus.org/downloads/ and also available on https://ninite.com/ , its regex stuff is covered nicely in https://markantoniou.blogspot.com/2008/06/notepad-how-to-use-regular-expressions.html and http://blog.hakzone.info/posts-and-articles/editors/understanding-regex-with-notepad/comment-page-1/ and https://gerardnico.com/ide/notepad/replace )

If you want to get a bit more advanced then grep, awk and sed are probably what you will be looking at before you do start making your own program (see most uses of python and perl). Most would associate them with linux and such like but Windows ports are available
http://matt.might.net/articles/sculpting-text/

That said are you really doing this enough that you have to have such a thing?
Yes! that works really well. Coupled with Notepad++ and ironically Word's Replace feature made the task much more instantaneous. Over 4530 entries were pruned and cleaned up in matter of seconds. I used your first link and modified the search perimeters from the first link a bit for an effective pruning. Thank you soo much.
And you're right I am not doing this very much, but with your answers it is achievable when the needs arises again.
 
  • Like
Reactions: Ryccardo
If you would like to get really good with regex, you can always install the Win32 version of sed. Its entire purpose is to search and replace. With it, you can create scripts that'll automatically handle this for you so you don't have to load a whole program each time.
 

Site & Scene News

Popular threads in this forum