Windows Registry files upload and manipulation

Hello all!

I need to develope a simple php page that takes a registry file as input, replaces some strings and start the download of the modified file, so that the user can execute it and import new registry file.

I face following problem (probably an encoding problem)

if i upload a file that was exportet from the registry no php function is able to search and replace things. (strange that it works only if I search for a single character, but not if I search for a string).

after some time testing the various replace-functions I tried to copy the content of the .reg file into a new txt file and this worked perfectly (note that only renaming the reg-file does not do the job.

What I know is that windows exports the .reg file encoded in UCS-2 Little Endian (in regedit v5).
If i export the file in regedit4 it works because it has different encoding… unfortunatly the files that I need to handle are all regedit 5!

any suggestions?

thanks in advance

Sponsor our Newsletter | Privacy Policy | Terms of Service