Sign in to follow this  
Followers 0
Redbeard

Convert .reg to .au3

8 posts in this topic

Has anyone come up with a script to reliably convert .reg files to .au3? There have been some great ones posted but they don't always handle DWORD values correctly.

Thanks in advance,

Redbeard

Share this post


Link to post
Share on other sites



Well, the only thing people here are going to do is point you to whats already been done.

lets face it, no one has the time nor will to be bothered re-inventing the wheel.

this seems to be the one people ran with:

http://www.autoitscript.com/forum/index.ph...c=1952&st=0

and if you read the entire thread, a LOT of bugs were fixed.. have you tried it on your .reg file?

you should, and if there are any issues, report them along with a copy of the registry entry you attempted to convert (and if possible, a suggested fix) this way, the creator can accommodate for that issue in their script.

alternatively, go with the good old fashioned way of doing things, file install your script and then run it this way.

For those who just needs to run an existing .reg file named myregfile.reg in c:\

run("c:\windows\regedit.exe /s c:\myregfile.reg")

Share this post


Link to post
Share on other sites

Well, the only thing people here are going to do is point you to whats already been done.

lets face it, no one has the time nor will to be bothered re-inventing the wheel.

this seems to be the one people ran with:

http://www.autoitscript.com/forum/index.ph...c=1952&st=0

and if you read the entire thread, a LOT of bugs were fixed.. have you tried it on your .reg file?

you should, and if there are any issues, report them along with a copy of the registry entry you attempted to convert (and if possible, a suggested fix) this way, the creator can accommodate for that issue in their script.

alternatively, go with the good old fashioned way of doing things, file install your script and then run it this way.

Well, I don't think it qualifies as reinventing the wheel when all you are trying to do is get the wheel to roll the way it should. :D The script as posted is fantastic, but it sometimes doesn't translate dword values correctly. I'd fix it if I could but I'm not sure how and that's why I posted my question here. Here is what it looks like:

This is the value from the registry(the one I'm trying to duplicate):

[HKEY_CURRENT_USER\Software\ZabaraKatranemia Plc\xplorer2_UC\Left pane settings]

"lvsStyle"=dword:56000349

The conversion script creates this:

RegWrite("HKEY_CURRENT_USER\Software\ZabaraKatranemia Plc\xplorer2_UC\Left pane settings", "lvsStyle", "REG_DWORD", "56000349")

And when that is entered into the registry it appears as:

[HKEY_CURRENT_USER\Software\ZabaraKatranemia Plc\xplorer2_UC\Left pane settings]

"lvsStyle"=dword:03567f5d

which is the hexadecimal value, not the decimal value. I've tried exporting from the registry both ways ("xp" version and "win 98" version) but it makes no difference. So, unless I'm being blind and/or foolish, which has happened before, this wheel don't roll like it should. :P

As for using regedit /s to import .reg files it doesn't work on my work pc, as they have disabled that feature. Besides, it's so much smoother to do it all with one script. :whistle:

I would also like to extend a HUGE thanks to the members who wrote the script the way it is. It still makes my life much easier.

Share this post


Link to post
Share on other sites

Righto, now i see the issue you are encountering.

what happens if you MANUALLY create a script to write that dword value?

the way i see it, when manually created the script would do the same thing..

Even if i manually create a REG_DWORD value, as Binary and input your information, it writes a Hexdecimal value with a binary one in parenthesis (by manually, i mean i just opened regedit.exe and create a key with a value

have you tried to see if the program will just run anyways?

Share this post


Link to post
Share on other sites

Righto, now i see the issue you are encountering.

what happens if you MANUALLY create a script to write that dword value?

the way i see it, when manually created the script would do the same thing..

Even if i manually create a REG_DWORD value, as Binary and input your information, it writes a Hexdecimal value with a binary one in parenthesis (by manually, i mean i just opened regedit.exe and create a key with a value

have you tried to see if the program will just run anyways?

Yep, I've tried running the program with the "wrong" values and it screws it up. I can enter the info into the scrip manually, that's why I love the script even as it is: It still saves me a ton of time entering all the other values perfectly. I'll keep playing with it, there has to be a way to make it work.

Thanks for your help.

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

The script as posted is fantastic, but it sometimes doesn't translate dword values correctly.

Yes, Dan's script does convert DWord values incorrectly as I included the code into my creation of Sendtoa3x. You can download it and select source as a componant while installing and view the changes I made to fix and enhance on Dan's code.

:whistle:

Edited by MHz

Share this post


Link to post
Share on other sites

Yes, Dan's script does convert DWord values incorrectly as I included the code into my creation of Sendtoa3x. You can download it and select source as a componant while installing and view the changes I made to fix and enhance on Dan's code.

:whistle:

I just did a quick test on it and it seems to work perfectly! Thanks loads MHz, you've made my night. :P

Share this post


Link to post
Share on other sites

I just did a quick test on it and it seems to work perfectly! Thanks loads MHz, you've made my night. :P

Glad it works for you and your welcome to it. I still need to adapt SendToA3X to be compatible with Vista's non cascading SendTo menu yet. Will happen soon.

:whistle:

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0