.reg file format

Discuss anything related to JauntePE, the utlimate utility to help you tame non-portable applications. Share your experience about the apps that work with JauntePE, and the apps that don't.
Post Reply
Message
Author
sgp
Posts: 67
Joined: Sat May 12, 2007 1:05 am

.reg file format

#1 Post by sgp »

It seems to me that jauntePE writes all .reg file keys in hex, am I correct? Can anyone suggest any tool to help convert that hex-only format to/from the "richer" format that regedit - and other registry editors - can export/import? What I'm after is the ability to change some of the .reg file data, and to import missing keys from my system registry. The current, hex-only format makes such operations unnecessarily complicated. Thanks in advance.
--sgp

User avatar
Firewrath
Posts: 321
Joined: Mon Aug 28, 2006 2:36 pm

#2 Post by Firewrath »

Ahhh, yes,
i went through this annoying bit myself lately with a program called EasyCode for GoASM, :P
i had to do it by hand though,
i didnt find an actually .reg file converter,

i can understand why it uses Hex instead of ASCII, and its easy enough once you get the hang of it,

i found this program, which helps alot:

http://www.sb-software.com/baseconverter/

its not portable though, see here for info:
http://portablefreeware.com/forums/viewtopic.php?t=1739


But, i downloaded and tryed like 4-5 programs, i wont get into those,
but this was the biggest help:

http://www.vortex.prodigynet.co.uk/misc/ascii_conv.html


its a javascript, ...which i DLed and keep on my comp now, :P
two Important things to remember is, first, ASCII doesnt work,
and two, you need "00," between every hex character in the .reg file and a "," after every hex character,

Hope that helps,

redllar
Posts: 411
Joined: Thu Aug 03, 2006 7:52 pm
Contact:

#3 Post by redllar »

Hey guys. I was directed this way by Chris. He'd already asked about this back on his ObjectDock thread when we started getting way off topic about all sorts of things.

EDIT: Forgot to mention, have you tried just importing the .reg into your registry and then using regedit to edit it, and then export it back out? You can safely do this by simply prepending each key with some "play area" key path, such as HKEY_CURRENT_USER\Software\MySandbox. I tried this out with 2K's regedit and unfortunately it doesn't convert the hex(1) values to strings as it should. But maybe XP's regedit does?

If you just want to look at the .regs in a regedit-like manner, but with the hex'd strings converted to regular text, I can offer you a new version of RegPad. I *think* it might work on editing the hex'd values as well, but don't hold me to that as we stopped working on RegPad about the time that I started up with PortaPotty/JauntePE.

There's also a way for you to use regedit to directly edit a portable .reg. You basically JPEize regedit and set up its ini so that it uses the portable .reg you want to edit. The down side is you need to add in enough defaulted keys to complete the "top" of the hierarchy so that regedit is fooled into thinking that the .reg is the entire registry. Right now you have to do that manually. Then once you've made the changes to the .reg you need to take that stuff back out manually.

I've researched that today in order to post about it. While doing so I uncovered a couple more bugs. With the new jauntepe dll it definitely works though. So I'm going to post the steps to get it done as soon as I can.

The other thing I wanted to mention is that the jauntepe dll already has this capability built into it. The code's just commented out for now. So eventually this sort of thing will be pretty easy to do via a JPEized registry browser/editor. In fact, if you look at a JPE launchpad item's properties, you'll see a disabled "Configure for a registry browser" option. That's what that's there for.

sgp
Posts: 67
Joined: Sat May 12, 2007 1:05 am

#4 Post by sgp »

Thanks Firewrath and Redllar for all that info.
Redllar, AFAIK no, WinXP regedit doesn't do hex exporting.

redllar
Posts: 411
Joined: Thu Aug 03, 2006 7:52 pm
Contact:

#5 Post by redllar »

After sleeping on it I think it might be quicker for now to just make a little command line filter app to:

1) Convert all of the .reg hex(1) strings to their standard string equilvalents. You could then use whatever .reg editing tool you have to make the changes, and then re-run the filter to put it back to its JPE-ready state.

or

2) Add into the .reg the keys necessary to allow for a JPEized regedit to be used to edit the .reg as if it were the system registry. You could then run regedit via a jpe-built launcher to make the changes, and then re-run the filter to put it back to its JPE-ready state.

Preferences? I can get this done pretty easily over the weekend.

User avatar
Firewrath
Posts: 321
Joined: Mon Aug 28, 2006 2:36 pm

#6 Post by Firewrath »

Just skimming over a few things here before i head to bed,
(yes, 10:30am and im Just going to bed, ...and gonna be up in like, 5-6hrs, *Sigh*)
Anyways,.....
redllar wrote: Preferences? I can get this done pretty easily over the weekend.
i just have to say, sometimes i dispise you, ;)
(j/k ofcourse, :P)

Otherwise,
i was thinking about this after i posted,
i thought a little notepad like app would be cool,
have it open the .reg and convert them to 'normal',
then people could edit them as they like, then hit save and itd convert them back into reg-hex,

but, thats prolly abit more work then needed, :P
so i like option one,
a command line app thatd convert all .regs in a folder would be pretty easy for everyone to use,
i know it might be a little bit of a pain time wise for a registry folder like i have with my JPE'd psart, but i dont think a lot of ppl use JPE like that, and a 'file name:' console would get old everytime you just want to convert one file, :P

Chris
Posts: 106
Joined: Sun Dec 03, 2006 10:08 am

#7 Post by Chris »

I did some test about this. I think I was able to get "export" to hex using JPEized regedit, but I encountered something strange.

I run JPEized regedit, click File and Import a .reg and close the regedit. In the portable .reg, I found the .reg in hex value
But inprocess, after I import the .reg (in JPEized regedit), I could not see (thus, couldn't edit) the key that is imported. And when I want to create the same key, it says that the key is already there.
So, it's there but regedit doesn't read to show it.

Also, I could not rename entry, inside key created using JPEized regedit in JPEized regedit. So, I run JPEized regedit was able to create a key called it Test, and in that Test I tried to create an entry (dword). It shows "New Value #1", but when I want to rename it, regedit told me it already exists.

EDIT: I agree with Firewrath, a notepad app that would convert hex to string so we can read it. And when saved, it would save as hex.

redllar
Posts: 411
Joined: Thu Aug 03, 2006 7:52 pm
Contact:

#8 Post by redllar »

Yeah Chris, you ran into the problem with the JPE-created .regs for apps that browse the registry. It has to do with a limitation in JPE where JPE does not present a "merged" registry to apps that browse through it.

Right now it's just too much work for me to solve. I know where to go and what to do; it's just too much rework and retesting to justify for now.

Chris
Posts: 106
Joined: Sun Dec 03, 2006 10:08 am

#9 Post by Chris »

I know where to go and what to do; it's just too much rework and retesting to justify for now.
I don't think it's that urgent to solve this. So, please don't think too much about this. Besides, JPE is flexible so there are work around for editting JPE-reg. I have made a small tutorial to edit JPE-reg using your second suggestion, which I think is quite easy.
If you spot something's not right, please correct it.

Import part of JPE-reg you want to edit to the system registry. Run JPEized regedit. Edit the needed entry and exit the regedit. Then in the regedit's JPE-reg you will see your edited entry in Hex (JPE-reg format). And don't forget to remove the key from system registry.

Example:
JPE registry file called Test.reg:

Code: Select all

[HKEY_CURRENT_USER\Software\JPE-Test]
@=hex(1):00,00
"Path1"=hex(1):43,00,3a,00,5c,00,4a,00,61,00,75,00,6e,00,74,00,65,00,50,00,45,00,00,00
"Path2"=hex(1):44,00,3a,00,5c,00,4a,00,61,00,75,00,6e,00,74,00,65,00,50,00,45,00,00,00
The string value of "Path1" is "C:\JauntePE".

User wants to change "Path1" to "C:\JPE", to do this:
Import the Test.reg to system registry. Run JPEized regedit and edit "Path1" to "C:\JPE".
After doing the edit, close the JPEized regedit. You will see the content of JPE-reg created by JPEized regedit is:

Code: Select all

[HKEY_CURRENT_USER\Software\JPE-Test]
"Path1"=hex(1):43,00,3a,00,5c,00,4a,00,50,00,45,00,00,00
The string value of "Path1" is "C:\JPE".

Delete HKEY_CURRENT_USER\Software\JPE-Test in the system registry. Overwrite "Path1" in Test.reg with the new entry and you have the JPE-reg from JPEized regedit.

EDIT: Add an explanation that JPE-reg needs to be imported is only the one you want to edit. I guess, with this you would need to have a bit of experience with Windows Registry editting.
Last edited by Chris on Sat Aug 11, 2007 11:18 pm, edited 2 times in total.

sgp
Posts: 67
Joined: Sat May 12, 2007 1:05 am

#10 Post by sgp »

In addition to the JPEized regedit -- which I must admit scares me a bit -- a good approximation of option 1 is available online (thanks Firewrath for the pointer) at http://www.vortex.prodigynet.co.uk/misc/ascii_conv.html

TIP: using ,00, as the separator will give you exactly the hex format that JPE expects, except for the terminating 00,00,00 sequence which you'll have to add to a converted string.

sgp
Posts: 67
Joined: Sat May 12, 2007 1:05 am

#11 Post by sgp »

Chris wrote: Import part of JPE-reg you want to edit to the system registry. Run JPEized regedit. Edit the needed entry and exit the regedit.
I just tried this sequence and it worked for me:

1. Run JPEized regedit (actually, I used another registry editor, but I guess it shouldn't matter)
2. Import key.reg with the whole key structure I want to edit
3. Make changes to this key structure in JPEized regedit
4. Exit JPEized regedit

This way nothing got written to the real system registry, while the entire key structure was output to the .reg file that the JPEized regedit created.
Last edited by sgp on Sun Aug 12, 2007 11:31 am, edited 1 time in total.

redllar
Posts: 411
Joined: Thu Aug 03, 2006 7:52 pm
Contact:

#12 Post by redllar »

I went ahead and wrote a little notepad-like editor for you guys that auto-converts the string values as requested. There's not much to it but maybe it'll be of use for those that don't want to mess with JPEizng a reg editor. I'll include it in the next set of emails sent out with the new jauntePE dll, hopefully today.

Post Reply