Jump to content

reg2au3


Sigi2
 Share

Recommended Posts

  • 6 months later...

I am not able to get this download. Can you send it to me? rpolito30@hotmail.com

ever wanted to write many registry keys at once using regwrite within a script ??

tired about fileinstall a .reg file and run regedit -s ??

this script helps you converting your .reg files (exported with regedit from registry)

to .au3 code ready to paste into your script.

yes, it can read UNICODE files (exported with windows 2000/xp).

Unicode-Reading is limited to ANSI-Code only!

an other handicap is that autoit could not write every kind of registry

value types like REG_NONE or REG_LINK and others.

look at my way to read a simple unicode text file ...

the script is not well commented yet - give it a try.

comments / ideas are welcome.

Link to comment
Share on other sites

  • 2 years later...

Great utility. I use it often.

I removed redundant variable DIMs, and fixed the REG_BINARY type handling to work properly.

Reg2au3.au3

Link to comment
Share on other sites

  • 8 months later...

I removed redundant variable DIMs, and fixed the REG_BINARY type handling to work properly.

Agreed - this is a fantastic utility, and massive thanks to all involved in its development!

I have one question, though... One of the reg files I'm trying to convert uses hex(:mellow: - that's a b wrapped in brackets, in case the forum makes it a smiley - which is still showing as an unsupported type.

[HKEY_CURRENT_USER\Software\Autodesk\AutoCAD\R18.0\ACAD-8005:409\MiniDump]
"AccumulatedUptime"=hex( b ) : 66,8d,09,08,00,00,00,00
"AccumulatedCalUptime"=hex(B):de,de,1f,87,00,00,00,00

In the registry, this shows up as a
"AccumulatedCalUptime"
REG_QWORD
d4 62 94 a2 00 00 00 00

"AccumulatedUptime"
REG_QWORD
c2 da 28 0d 00 00 00 00

Normally, I like to have a crack at things like this myself as I hate looking like some kind of leech - but I'm afraid anything to do with maths sends me into a wibbling heap!!

I can modify the generated au3 script for my particular requirements by hard-coding what is meant to be put in as a QWORD, but it seems a shame that this powerful script can't handle this particular type of string.

Is there any chance some kind soul out there fancies tackling this?

Regards,

Gerard

Edited by gerardsweeney
Link to comment
Share on other sites

  • 2 weeks later...
  • 3 weeks later...

;start and fileselect-dialogs
if 1 then
    ; setup
    If Not FileExists(@SystemDir&'\reg2au3.au3') Then
        If MsgBox(4, "message", 'reg2au3.au3 >>> system32 ???')=6 Then
            FileCopy(@ScriptDir&'\reg2au3.au3', @SystemDir,1)
            RegWrite("HKCR\regfile\shell\conv","","REG_SZ","Convert reg2au3")
            RegWrite("HKCR\regfile\shell\conv\command","","REG_SZ",@AutoItExe&' "'&@SystemDir&'\reg2au3.au3" %1')
        EndIf
    EndIf

    $sTarget = StringTrimLeft($CmdLineRaw, StringLen('"'&@ScriptFullPath&'" '))
    If $sTarget='' Then
        $file_in = FileOpenDialog("Select", @ScriptDir & "", "reg-file (*.reg)", 1 + 4 )
        If @error Then Exit
    Else
        $file_in=$sTarget
    EndIf
    $file_in_size = FileGetSize($file_in)
    If $file_in_size = 0 Then _Error("source-file is empty")
    $file_out0 = StringTrimRight($file_in, 3)
    
    $i = 1
    While FileExists($file_out0&$i&'.au3')
        $i +=1
    WEnd
    $file_out=$file_out0&$i&'.au3'
EndIf

___________________________

REGEDIT4

# comment

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced]

"Start_LargeMFUIcons"=dword:00000000

# comment

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced]

"Start_MinMFU"=dword:00000000

# comment >>> Warning, Warning, Warning ...

# comment >>> ;# comment

Link to comment
Share on other sites

  • 3 weeks later...
  • 3 months later...

I have one question, though... One of the reg files I'm trying to convert uses hex(:blink: - that's a b wrapped in brackets, in case the forum makes it a smiley - which is still showing as an unsupported type.

To my knowledge, AutoIt does not support the HEX type.

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...