Jump to content

Wrong working with registry


Guest ice99
 Share

Recommended Posts

Guest ice99

I have branch of registry (obtained by exporting it from registry in *.reg file)

When i click this file, all nesessary information adds to registry and everything

is ok. BUT WHEN I TRY TO ADD IT WITH RegWrite ( "keyname" [,"valuename", "type", value] )

it adds completely different values to registry. I think i know the point.

----- *.reg file have UNICODE format with a lot of special symbols

-----*.au3 file have different format and does'n completely support all keys

All clear, when you deal with digits 0-9 and letters a-z, but my registry branch store

"€с—Џ¤Ёѕ¦" value (encrypted data).

When i write RegWrite("path", "key", "REG_SZ", "€с—Џ¤Ёѕ¦") - YES IT ADDS VALUE,

BUT DIFFERENT FROM "€с—Џ¤Ёѕ¦". Number of letters is constant, but letters are different,

and of course decryption of this key is fail.

ANY SUGGESTION? ANY WAY TO SOLVE THIS PROBLEM

Link to comment
Share on other sites

AutoIt is an ANSI program.

If it is only a small change. You could run %ComSpec% to Reg Add the values, into the registry.

Example:

RunWait(@ComSpec & ' /c Reg Add "hkcu\software\test" /v Unicode /t reg_sz /d ??¤??¦', '', @SW_HIDE)

Or AutoIt, could write a self destructing batch file, if a number of entries, is needed.

I have noticed with code tag preview, it does not support unicode? But the example, has been tested, with characters, that you supplied, and passed.

Link to comment
Share on other sites

I have branch of registry (obtained by exporting it from registry in *.reg file)

When i click this file, all nesessary information adds to registry and everything

is ok. BUT WHEN I TRY TO ADD IT WITH  RegWrite ( "keyname" [,"valuename", "type", value] )

it adds  completely different values to registry. I think i know the point.

----- *.reg file have UNICODE format with a lot of special symbols 

-----*.au3 file have different format and does'n completely support all keys

All clear, when you deal with digits 0-9 and letters a-z, but my registry branch store

"сЏ¤Ёѕ¦" value (encrypted data).

When i write RegWrite("path", "key", "REG_SZ", "сЏ¤Ёѕ¦") - YES IT ADDS VALUE,

BUT DIFFERENT FROM "сЏ¤Ёѕ¦". Number of letters is constant, but letters are different,

and of course decryption of this key is fail.

ANY SUGGESTION? ANY WAY  TO SOLVE THIS PROBLEM

<{POST_SNAPBACK}>

I don't think there is a simple solution with AutoIt3 functions as AutoIt3 strings are not Unicode. Only the Send function can send with ASC{} a unicode character. :(
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...